Originally posted by Soni Mitesh:
Hello friends,
I have tried to do deployment of servlet / jsp files
but unable to execute it in a browser.
I have tried performing it by reading the book head first servlet.
could you please make me understand or give me steps
how to create directories in Tomcat and then how to execute
for exam. http://mymagazine.com:8080/form.html or (myServlet)
such example is there in the book, but by passing this url
file not found error occurs...
Thanks
I would suggest you to follow following steps:
1.
Test URL:
http://localhost:8080 (8080 is tomcat's default port. You can confirm it in server.xml presents in conf folder).
If this doesn't show you "tomcat screen" then your server is not started. In this case, download tomcat (from "apache site") and JDK (from "sun site"), unzip them in some directory. Add following two lines in startup.bat file (present in bin directory of tomcat):
set JAVA_HOME=<your jdk path>
set CATALINA_HOME=<your tomcat path>
2. Now double click startup.bat, check the URL mentioned above - it should work now.
3. Now place your application in webapps folder of tomcat. For time being, create a simple application that has single JSP file.
c:\tomcat\webapps\simpleapplication\test.jsp
I don't think you need WEB-INF folder (and web.xml file inside it) for this application as you don't have any
java class (and servlet).
Now try this URL:
http://localhost:8080/simpleapplication/test.jsp Give it a try.
[ November 06, 2007: Message edited by: ankur rathi ]