tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ritesh Kumar <rite...@zeenext.com>
Subject Modified Servlet not getting loaded... did some R&D
Date Thu, 01 Jan 1970 00:00:00 GMT



Hi, 

I had written yesterday regarding this. Now some more query after doing
below R&D: 

Problem: Servlet classes are not getting reloaded 

R&D Done: When a Servlet java file is recompiled after the changes the new
class file is not being reloaded by the servlet
engine. We have used a decompiler to check if the changes are reflected in
the .class files and yes changes are reflected.We also
deleted the .class file but tomcat still gives the output. 
This means that tomcat stores the .class files in its cache memory. 

We have carried out the following conf. settings as suggested. 

1. Changes in the conf/server.xml: 
<Context path="" docBase="webapps/ROOT" debug="0" reloadable="true" > 
</Context> 

Context for /test and /examples is basically the same. 

2. We have blocked the direct access to WEB_INF directory by changing the
tomcat-apache.conf including 
    ApJServMount /Shop /root 
  <Location /Shop/WEB-INF/> 
    AllowOverride None 
    deny from all 
  </Location> 

This ensures that this directory is served by Apache via Tomcat. Apache
sends the requests to this directory to 
Tomcat rather than serve the directory directly. 

Looking for solution 

It should not be necessary to restart a development server, much less a
production server, in order to modify a single servlet on
a site.So, 

1. Is there any other conf setting to be done? 
2. Is there any way of clearing the cache of tomcat where it keeps the
.class files. 
3. Is there any manual way of reloading the servlets. 
4. Is there a patch for tomcat to do the job? 

Regards, 
Ritesh Kumar


Mime
View raw message