Women in Technology

Hear us Roar



Article:
  Deploying Web Applications to Tomcat
Subject:   Servlet Caching in Tomcat 3.2.3
Date:   2001-12-03 04:48:58
From:   jolmstead2k
Much has been written about servlet caching in Tomcat, but I don't see a solution out there. I have tried the following code :

response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
But I believe this code effects browser cache and not the cache of the servlet engine itself.


I have also have added reloadable="true" to the sevlet context of the server.xml file. Am I missing something, or am I just stuck with having to restart Tomcat every time I modify a servlet ?


Thank You;


John Olmstead
dbaDirect
John.Olmstead@dbaDirect.com
(859) 283 2520 ex 221

Full Threads Newest First

Showing messages 1 through 6 of 6.

  • Servlet Caching in Tomcat 3.2.3
    2002-10-15 21:15:01  mta [View]

    I have expirence a even more strange problem,
    even restarting the Tomcat is not reloading the
    jsp, we even did a reboot and the old jsp is still
    running.
    • Servlet Caching in Tomcat 3.2.3
      2003-12-09 00:33:36  anonymous2 [View]

      This may happen if we modify the date of the server backwards? The compiled jsp-servlet would have the timestamp of future now, which would be greater than your jsp, hence never causing it to be reloaded.

      The only solution to this would be to go into the tomcat work directory and delete the compiled servlet java and class files
      • Servlet Caching in Tomcat 3.2.3
        2005-02-15 05:59:04  java4ever [View]

        I know this is an old issue, but I wanted to make it just look more worse and clear, also updated.

        I am using Tomcat 5.2 and am still suffering from this problem. I also tried searching the whole net for a solution, but found nothing but problems. And about restarting the server, let me make it worse... I restarted the whole PC and it still didnt work!. Its one of the very rare times where restarting Windows does not payoff any good! I tried deleting files, copy and paste from another folder and still suffering from this.

        If anyone by any chance has the solution, please let him tell me.

        Regards
        • Servlet Caching in Tomcat 3.2.3
          2006-02-15 03:19:43  Bidders [View]

          I'm not sure about tomcat 3.2.3 specifically, but Tomcat will cache the outcome of a jsp request in the [tomcat install]/work folder. Removing files in this folder forces tomcat to rebuild the page at the next request.
      • Servlet Caching in Tomcat 3.2.3
        2005-02-15 06:00:56  java4ever [View]

        I know this is an old issue, but I wanted to make it just look more worse and clear, also updated.

        I am using Tomcat 5.2 and am still suffering from this problem. I also tried searching the whole net for a solution, but found nothing but problems. And about restarting the server, let me make it worse... I restarted the whole PC and it still didnt work!. Its one of the very rare times where restarting Windows does not payoff any good! I tried deleting files, copy and paste from another folder and still suffering from this.

        If anyone by any chance has the solution, please let him tell me.

        Regards
  • Servlet Caching in Tomcat 3.2.3
    2003-10-29 16:13:37  anonymous2 [View]

    This problem caused me so much time. What I found is Tomcat looks into "classes" before it looks into "lib" dir. The solution is to clean out the "classes" directory to force Tomcat to read from lib only.

    C:\Apache_Group\jakarta-tomcat-4.1.27\webapps\axis\WEB-INF\classes

    C:\Apache_Group\jakarta-tomcat-4.1.27\webapps\axis\WEB-INF\lib