The archives/docs contain two main pieces of advice for those seeking to enable
autoreloading of servlets under a specific Tomcat context.
i) Set the <Context reloadable="true"> attribute for your context.
ii) Ensure that the classpath used to start Tomcat doesn't include the path to your
servlets.
Having (as far as I can see :-) followed this advice, I _still_ can't get
autoreloading to work.
My environment:
Tomcat 3.2 (in standalone mode)
SunOS 5.6
CLASSPATH=.:${SERVLET_HOME} #$SERVLET_HOME is the path to the Servlet 2.2 classes
CLASSPATH=${CLASSPATH}:${JDBC_HOME}/lib/classes12.zip:${JDBC_HOME}/lib/nls_charset12.zip
CLASSPATH=${CLASSPATH}:${JDBC_HOME}/lib/jta.zip:${JDBC_HOME}/lib/jndi.zip
CLASSPATH=${CLASSPATH}:${JAXP_HOME}/jaxp.jar:${JAXP_HOME}/parser.jar
CLASSPATH=${CLASSPATH}:${JAVA_HOME}:${JAVA_HOME}/usr/bin
CLASSPATH=${CLASSPATH}:${JAVA_HOME}/usr/java1.2/lib/tools.jar:${JAVA_HOME}/java1.2/jre/lib
(no point boring you with the resolved version)
The relevant server.xml file excerpt:
<Context path="/resource"
docBase="webapps/resource"
crossContext="false"
debug="0"
reloadable="true" >
</Context>
A further point of confusion for me is that, if I amend one of the example servlets
(eg HelloWorldExample.java), then this reloads automatically.
If, however, I amend one of _my_ servlets (e.g. by changing some output text) and then
recompile it, the old .class file is used by Tomcat.
My servlets are sat in $TOMCAT_HOME/webapps/resource/WEB-INF/classes
The server.xml file, though, contains an identical <Context> entry for both the
example context and for my context... help!
So... what am I missing? Hopefully somebody'll be able to point me in the right
direction, and for that, many thanks.
I know this question appears regularly, but as far as I can see I've followed the
advice that is given on these occasions...
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html