Charles Bell
Posts: 519
Nickname: charles
Registered: Feb, 2002
|
|
Re: simple JSP program, error 500 file not found problem
|
Posted: Sep 2, 2002 12:18 PM
|
|
Hey, congratulations on getting your jsps going!
As best as I understand it, contexts are like web applications that have a folder under the tomcat webapps folder.
The server.xml file designates where and how to treat these different contexts.
I have a context setup in my Tomcat server.xml file as follows: <Context path="/" docBase="webapps/htdocs" debug="0" reloadable="true" trusted="false" > </Context> I put my web and jsp pages in the docBase or "webapps/htdocs" folder and my class files in the "webapps/htdocs/WEB-INF" folder
When I start my tomcat server running on my pc, I put in the following url in my web browser to see the root index html web page: http://127.0.0.1/index.html and from there link to subfolders where my jsp files are located. Classes in the "webapps/htdocs/WEB-INF" folder are accessible from jsps.
If a have classes that are part of a package, then a folder structure that reflects the package name relative to webapps/htdocs/WEB-INF must be setup.
The java.sun web site has a Java Web Services tutorial at: http://java.sun.com/webservices/docs/1.0/tutorial/index.html
They have a whole section on Getting Started With Tomcat at:
http://java.sun.com/webservices/docs/1.0/tutorial/doc/GettingStarted.html
There is a Marty Hall tutorial for Tomcat 4 at: http://www.moreservlets.com/Using-Tomcat-4.html
I am no expert on all this jsp stuff, but I have managed to get a nice web application working on the internet, nothing as fancy as this site.
|
|