On Tue, 14 Aug 2001, Jonathan Pierce wrote:

> Craig wrote:
> 
> >>Servlets that load at startup are loaded from the webapp class loader
> >>(along with all other servlets, filters, and application event >>listeners),
> >>which checks things in the following order:
> >>
> >>  /WEB-INF/classes of your web-app
> >>  /WEB-INF/lib/*.jar of your web-app
> >>  $CATALINA_HOME/lib
> >>  $CATALINA_HOME/common/lib
> >>  System class loader (configured in catalina.sh or catalina.bat
> >>                       from a predefined CLASSPATH)
> >>  $JAVA_HOME/jre/lib/ext (i.e. the system extensions directory)
> >>  Java runtime classes
> 
> This should be an easy one to reproduce or explain away.  I can't get Tomcat
> 4.0b7 to see classes in the webapps directory at startup.
> 
> Try adding the following to your web.xml file. The class is already in the
> examples context. At startup, Tomcat shows a class not found error in the log
> file. Is there something else that is needed that I am missing here?
> 
>   <!-- SnoopServlet -->
>   <servlet>
>     <servlet-name>SnoopServlet</servlet-name>
>     <servlet-class>SnoopServlet</servlet-class>
>     <load-on-startup>7</load-on-startup>
>   </servlet>
> 

I hope you did this on the "examples" webapp, or on some other webapp
where SnoopServlet.class already exists :-)  It doesn't exist in the
Manager webapp, just as a for instance :-) :-).

I just edited the web.xml file for the examples app, and changed the entry
for the "snoop" servlet there, and the log says:

2001-08-14 19:07:30 snoop: init

immediately after a Tomcat restart.  This also works for me on every
Struts app I've ever tried.

Craig

Reply via email to