Web tier: servlets, JSP, Web frameworks: Help Me in Writing and Deploying my First JSP in Tomcat 5.0
- Posted by: Gundu Bhaskar
- Posted on: November 02 2003 17:42 EST
Please help me in Writing and Deploying My First JSP in Tomcat 5.0 on Windows 2000.
I am looking for a sample directory structure and the steps in doing every sub task.
Deploying on Tomcat5.0 is easy enough if you have prior experience in deploying in other web-containers by other vendors.
You can for starters have your own directory created under the "webapps" folder and save your .jsp there.
You can then bring up the server and then type http://localhost:8080/<your directory name>/<your JSP Name>.jsp .You will find the output displayed on your browser.
Hope it helps!!
I tried exactly what you said before as well.
C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\MyJSPs
and I have my jsp file in that called "One.jsp".
After starting my server,
I entered the following in my web browser(IE 6.0).
My Server is configured for 8086(I changed in server.xml and other example JSPs are working)
I entered with the exact case as JSPs and directories are case-sensitive.
Now, I get an error (as before):
Thanks and Best Regards,
Inside the <HOST></HOST> tags in your server.xml, include the following Context tag:
<Context path="/MyJSPs" docBase="MyJsps" debug="0"/>
You should be able to paste that line under the
<!-- Tomcat Root Context -->
<Context path="" docBase="ROOT" debug="0"/>
section you'll find 2/3's of the way down the server.xml file.