tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitri Colebatch <>
Subject Re: Executing servlets out of WEB_INF directory
Date Mon, 23 Jul 2001 04:30:26 GMT
Again - there is _no_ global web.xml - as you're learning.  my suggestiong
is to create an empty WEB-INF style directory structure, and put the
web.xml in there.  If you have the classes in the classpath this should
work (apache soap does this I think).

There cant be any global web.xml because the web.xml is context
specific.  What would happen if you set context parameters in the
"global" web.xml - would they apply to all contexts?  yes, you can develop
rules for this, but its not the way it works.


On Mon, 23 Jul 2001, Pancham Singh wrote:

> I have an existing aplication that does not use recommended WEB-INF =
> directory structure. System CLASSPATH is set to include class(including
> servlets) files of this particular application. I modified Tomcat's
> "global" web.xml (under $TOMCAT_HOME/conf directory) file to include a
> <servlet> tag for my servlet, similar to:
>      <servlet>
>          <servlet-name>
>              MyServlet
>          </servlet-name>
>          <servlet-class>
>              com.wmaniac.MyServlet
>          </servlet-class>
>      </servlet>
> If I try to access MyServlet using =
> http://localhost:8080/servlet/MyServlet (default servlet context, Ctx(
> )), I get 404 response rom Tomcat. I expected that since the class file
> for MyServlet is specified in CLASSPATH, InvokerServlet should be able
> to find this class thru its parent System Class loader, but apparently
> this is not the case. I also tried adding a context for my application
> in server.xml and tried to access it from the defined context, but still got
> the same 404 response from Tomcat. Can anyone please advise what I am doing
> wrong and how can I invoke a servlet that is not in the recommended
> directory structure (/WEB-INF/classes).
> Thanks,
> Pancham.
> _________________________________________________________________
> Get your FREE download of MSN Explorer at

View raw message