Top Banner
PREPARED BY RAVI KUMAR LANKE Page 1 Installing Tomcat On Windows 7
22

Installing tomcat on windows 7

May 13, 2015

Download

Education

Installing tomcat on windows 7
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 1

Installing Tomcat On Windows 7

Page 2: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 2

Installing Java

Tomcat requires java in order to run. If your computer already has java installed, you can probably skip

this step. However, make sure you have a recent version of java.

Setting the Java Environment Variable

Tomcat will need to know where you have installed java. To do this, you will need to set the

environment variable JAVA_HOME

Here are the steps for setting the environment variable

Goto start and right click on computer and click on properties

Page 3: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 3

Click on Advanced System Settings

Page 4: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 4

Click on Environment Variables

Page 5: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 5

Click on New

Page 6: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 6

Give Variable Name and Variable Value and click ok

Click ok and ok

Page 7: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 7

Installing Tomcat

After setting the JAVA_HOME environment variable, you can install tomcat

Go to the Tomcat software folder

Run the exe file.

I suggest you install Tomcat at c:\tomcat

Use the default settings and provide a password that you will remember

Page 8: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 8

Page 9: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 9

Page 10: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 10

Page 11: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 11

Page 12: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 12

Page 13: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 13

Running Tomcat

Here are the steps to see if Tomcat has been successfully installed

Start Tomcat by finding its start program in the Programs Menu (located in the Start menu). Look under

Apache Tomcat and select "Start Tomcat"

Open a Web browser and type in the following URL:

http://localhost:8080/

Page 14: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 14

Page 15: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 15

Page 16: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 16

At this point, you should see the Tomcat home page, which is provided by the Tomcat

Web server running on your computer. Note: if your computer has an internet name or

an IP number, you may access your Tomcat server anywhere on the internet by

substituting localhost with the full name or IP number.

To shut down your server and remove the Console window, select "Stop Tomcat" in

the same menu of where you selected "Stop Tomcat".

Page 17: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 17

Page 18: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 18

Set Your CLASSPATH

Since servlets and JSP are not part of the Java 2 platform, standard edition, you have

to identify the servlet classes to the compiler. The server already knows about the

servlet classes, but the compiler (i.e., javac) you use for development probably

doesn't. So, if you don't set your CLASSPATH, attempts to compile servlets, tag libraries,

or other classes that use the servlet and JSP APIs will fail with error messages about

unknown classes. Here are the standard Tomcat locations:

Tomcat : c:\tomcat\lib\servlet.jar

in addition to the servlet JAR file, you also need to put your development directory in

the CLASSPATH. Although this is not necessary for simple packageless servlets, once

you gain experience you will almost certainly use packages. Compiling a file that is in

a package and that uses another class in the same package requires the CLASSPATH to

include the directory that is at the top of the package hierarchy. In this case, that's the

development directory I just discussed. Forgetting this setting is perhaps the most

common mistake made by beginning servlet programmers!

Finally, you should include "." (the current directory) in the CLASSPATH. Otherwise,

you will only be able to compile packageless classes that are in the top-level

development directory.

Page 19: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 19

Click ok ok ok and close the window

Page 20: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 20

Set Your CATALINA_HOME :

Click ok ok ok and close the window

Page 21: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 21

Click ok ok ok and close the window

Page 22: Installing tomcat on windows 7

PREPARED BY RAVI KUMAR LANKE Page 22

ENVIRONMENT VARIABLES SETTINGS FOR TOMCAT :

1. Right click on My Computer. 2. Select Properties. 3. Select the Advanced tab. 4. Select the Environmental Variables button. 5. Under the System Variable group, select New. 6. In the Variable Name field, type JAVA_HOME. 7. In the Variable Value field, type the name of the path to your

JVM (e.g., C:\Java). 8. Select OK. 9. Under the System Variable group, select New. 10. In the Variable Name field, type CATALINA_HOME. 11. In the Variable Value field, type the name of the path to

Tomcat (e.g., C:\Tomcat). 12. Select OK. 13. Select OK. 14. Select OK.