Apache Tomcat Installation and Trouble shooting: 1. First Install jdk1.5 to any directory you like, such as c:\Program Files\Java\jdk1.5 2. set System Environmental variable JAVA_HOME at c:\Program Files\Java\jdk1.5 3. Now Install Tomcat. If it detects your java home correctly then proceed on. 4. click next to complete installation process. Now how you will run your jsp ? 1.In the tomcat installation directory you will find server\webapps directory. 2. Create a directory such as centraldb in the server\webapps directory. 3. Go to the url:
4. Click the Tomcat Administration link.
5. Give userid and password.
6. Click on the tree root on service link.
7. Then click on Host(localhost).
8. Select Create New Context on Host Actions combo box.
7. On the document base text box write the base address of
webapps directory. I have given C:/Program Files/Apache
Software Foundation/Tomcat 5.0/server/webapps/centraldb.
Note that here we use / instead of \.
6.write /centraldb on the path text field.
7.Set the Reloadable fields true.
8.Click the save field to finish deploying a project.
** Now restart the Tomcat Service other wise we will find an
error saying that error in java.lang.Thread.
9. In the centraldb there will be a directory named WEB-INF
in which there will be directories named classes and lib and a
xml file named web.xml. In classes directory you will put
classes for Servlet and in lib directory you will place java
library files and database connector(mysql connector).
10.Now put your jsp file at the centraldb directory.
*** Enjoy your first jsp with the url:
http://localhost:8080/centraldb/Test.jsp
.*** Here is the Code for Test.jsp
<%
out.println(Hello Software House);
%>
*** I think this will help you from facing lots of problems that I faced to begin jsp. -ove