tomcat doens't refresh classes

C

charly

Greetings,

Here is my install :
Linux Mandrake
Tomcat 4.1.27
Server.xml :
<Context path="/myApp" docBase="myApp" debug="0"
reloadable="true" crossContext="false"/>

I work with eclipse. Source dir is in WEB-INF/java and classes are in
WEB-INF/classes

When I change the code of one of my servlet, I compile, save the file it the
classes dir.
I wait for 6 seconds, and tomcat says :
WebappClassLoader: Resource '/WEB-INF/classes/mvc/Controller.class' was
modified; Date is now: Wed Aug 13 15:36:47 CEST 2003 Was: Wed Aug 13
15:33:03 CEST 2003

Great :)

Now I refresh the page in the browser and :

I get either :
org.apache.jasper.JasperException: /index.jsp(46,73) Unable to load class
errFormulaire

or class xxx is unavailable.

I've got to stop tomcat and restart it and this time, everything is ok....

Can someone help me please ?

many thx
 
J

Jim

Hi,

putting
<DefaultContext reloadable="true"/>;
in my "TOMCAT_HOME/conf/server.xml" file does the trick for me.
The above comes after the declaration of mhy application base in the
server.xml
file (which may or may not matter)
<!-- Define the default virtual host -->
<Host name="localhost" debug="0" appBase="HSP"
unpackWARs="true" autoDeploy="true">


I start Tomcat (on Windows XP) with the following shortcut which opens a
console window.





\java\j2sdk1.4.1_02\bin\java.exe -jar -DHSP_LOG_DIR=C:\cant\HSP\logs -Dus
er.dir="C:\Tomcat" "C:\Tomcat\bin\bootstrap.jar" start

When I rebuild any servlet, Tomcat prints, after several seconds,
WebappClassLoader: Resource '/WEB-INF/classes/hsp/Login.class' was
modified; Date is now: Wed Aug 13 10:48:33 EDT 2003 Was: Sun Aug 10 20:50:30
EDT 2003

Hope this helps.

jim cant
 
C

charly

I know I am supposed to define the reloadable attribute but it does not
work at all...

I'm still looking for info :(
 
A

Andy

I'm experiencing the same problem. When I recompile a class in
WEB-INF/classes, I can see a message in catalina.out that states the
resource was modified, but if I request the jsp page that calls a
method in the class, Tomcat reports that it can not compile the JSP
because the package is not found.

Can anyone shed some light on this?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top