Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic question on JSP deployment

Status
Not open for further replies.

ekatz

Programmer
Mar 11, 2003
3
US
I'm new to JSP and I must be missing somthing.

I'm trying to deploy a simple "Hello World" app which consists of only one jsp file.

I created a separate directory under webapps and put the
.jsp file into it. I created a WEB-INF subdirectory with a simple web.xml file. I restarted Tomcat.

It sounds from the documenation that Tomcat will automatically see the new subdirectory and add the new "application". But when I try
I get the http 404 error: Requested resource not available.

What more do i have to do?
 
Thanks for your reply.
Yes, I can see
No, I cannot see mydir. (I renamed my jsp to "index.jsp".

I thought that maybe there was something wrong with my jsp, so I copied index.jsp from ROOT to mydir, and I also copied the web.xml. I restarted Tomcat.

I still does not work. I get "HTTP Status 404
The requesed resource /mydir/ is not available"

Puzzled...
 

Do you have installed only one Tomcat server on your machine ?
 
Just several ideas, assuming you have Tomcat 4:

- Could you run and see if you have the context /mydir under the 'localhost' host ?
- In your server.xml config file you should have the entry similar to this:
<Host name=&quot;localhost&quot; debug=&quot;0&quot; appBase=&quot;webapps&quot;
unpackWARs=&quot;true&quot; autoDeploy=&quot;true&quot;>
Is your appBase set to webapps ?

Maybe that helps
Grzegorz
 
I think I found it.
It seems that I had configured Tomcat to run as a service, but was also starting and stopping it manually.
So when I thought I was stopping it, there was still an instance running.
Thanks to everyone for all their help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top