[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-user
Subject:    RE: Help!!  Apache won't redirect to tomcat
From:       Andrew Inggs <Andrew.Inggs () teleca ! com>
Date:       2001-07-31 16:59:11
[Download RAW message or body]

Nance, Michael wrote:
> Are you saying it does NOT use web.xml?  Then what does it use?

Correct, it does *not* use TOMCAT_HOME/conf/web.xml.
But, it *does* use PATH-TO-YOUR-WEB-APP/WEB-INF/web.xml.
And, it *does* use TOMCAT_HOME/conf/server.xml.

You seem to be missing the whole web app setup.  The way to
setup a web app is to create the following directory hierarchy
(typically in TOMCAT_HOME/webapps/MYWEBAPP, where MYWEBAPP is
the name of your web app):

WEB-INF/web.xml  <-- config for your web app
WEB-INF/classes  <-- root of the Java classes hierarchy
index.html       <-- static welcome page (not required)

If this is in a subdirectory of TOMCAT_HOME/webapps then it is
automatically configured and you should be able to access the
servlets with something like

http://localhost:8080/MYWEBAPP/MyServlet

If it is not a subdirectory of TOMCAT_HOME/webapps, you need to
add a context in TOMCAT_HOME/conf/server.xml.

> I did rename it and got the same error...so now I am very confused.
> Also in server.xml
> I have this
>        <Context path="" docBase="../../../../src/public_html" 
> debug="0"
> reloadable="true" >
>         </Context>
> which points to the location of my servlets....

OK, so based what I have above, you have added a root context
(path is blank) to server.xml which points to a directory
(docBase):
../../../../src/public_html

That's fine, now you need these:

../../../../src/public_html/WEB-INF/web.xml  <-- config file
../../../../src/public_html/WEB-INF/classes  <-- Java class files

Inside this web.xml you need to define the servlets you want to
have visible and the URL patterns that should be directed to
them (see one of my previous posts in this thread for an example).

I hope this helps to clear things up for you :-).

-- Andrew

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic