File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes web application can't start my application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "web application can Watch "web application can New topic

web application can't start my application

Erwin Bredford
Ranch Hand

Joined: Feb 11, 2003
Posts: 167
i am having a problem with tomcat standalone 4.1
it doe not seem to find my web application
it keeps giving me The requested resource (/App/reg) is not available.
http staus 404 expection what is responsible for this.
the tomcat installation is fine cause it shows the index.jsp file
when you go to the http://localhost:8080
i have a deployment descriptor(web.xml)
which the web application manager sees the description of the web.xml file.
i placed my web app on the webapps directory
that is %catalina_home%/webapps/myApp
is it cause i did not set a context path for my app cause the web Application manger gives this error-Message: FAIL - Application at context path /App could not
could you explain to me in a step by step procedure on how to set the context path for web applicaton.
please can i get a solution soon

p.s my application just has a servlet in the web-inf/classes dir
and a web.xml in the web-inf dir
thanks again

--One learns a lot during a lesson but seeing is not enough,you must do;knowing is not enough ,you must apply--<br />SCJP 1.4,SCBCD,SCEA part 1,OCM JEE Enterprise Architect.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

WEB-INF should be all caps.

In server.xml, place this right after the examples context:

Create the following directories:

Inside WEB-INF, have a web.xml file that contains the following:

And finally, a single hello.jsp page under the /demo directory that contains:

By invoking http://localhost:8080/demo/hello.jsp do you get the right output?

That's all to confirm that Tomcat is happy with its configuration.

Otherwise, post more details, like your servlet mappings in web.xml, and how you are calling it in the browser. The exact error messages if any, that are relevant in catalina_log, stdout, stderr and localhost_log
I agree. Here's the link:
subject: web application can't start my application
It's not a secret anymore!