Installing tomcat on windows 7

541 views
439 views

Published on

Installing tomcat on windows 7

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
541
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
17
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Installing tomcat on windows 7

  1. 1. Installing Tomcat On Windows 7 PREPARED BY RAVI KUMAR LANKE Page 1
  2. 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 PREPARED BY RAVI KUMAR LANKE Page 2
  3. 3. Click on Advanced System Settings PREPARED BY RAVI KUMAR LANKE Page 3
  4. 4. Click on Environment Variables PREPARED BY RAVI KUMAR LANKE Page 4
  5. 5. Click on New PREPARED BY RAVI KUMAR LANKE Page 5
  6. 6. Give Variable Name and Variable Value and click ok Click ok and ok PREPARED BY RAVI KUMAR LANKE Page 6
  7. 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 PREPARED BY RAVI KUMAR LANKE Page 7
  8. 8. PREPARED BY RAVI KUMAR LANKE Page 8
  9. 9. PREPARED BY RAVI KUMAR LANKE Page 9
  10. 10. PREPARED BY RAVI KUMAR LANKE Page 10
  11. 11. PREPARED BY RAVI KUMAR LANKE Page 11
  12. 12. PREPARED BY RAVI KUMAR LANKE Page 12
  13. 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/ PREPARED BY RAVI KUMAR LANKE Page 13
  14. 14. PREPARED BY RAVI KUMAR LANKE Page 14
  15. 15. PREPARED BY RAVI KUMAR LANKE Page 15
  16. 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". PREPARED BY RAVI KUMAR LANKE Page 16
  17. 17. PREPARED BY RAVI KUMAR LANKE Page 17
  18. 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:tomcatlibservlet.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. PREPARED BY RAVI KUMAR LANKE Page 18
  19. 19. Click ok ok ok and close the window PREPARED BY RAVI KUMAR LANKE Page 19
  20. 20. Set Your CATALINA_HOME : Click ok ok ok and close the window PREPARED BY RAVI KUMAR LANKE Page 20
  21. 21. Click ok ok ok and close the window PREPARED BY RAVI KUMAR LANKE Page 21
  22. 22. ENVIRONMENT VARIABLES SETTINGS FOR TOMCAT : 1. 2. 3. 4. 5. 6. 7. Right click on My Computer. Select Properties. Select the Advanced tab. Select the Environmental Variables button. Under the System Variable group, select New. In the Variable Name field, type JAVA_HOME. 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. PREPARED BY RAVI KUMAR LANKE Page 22

×