You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Asfand Qazi <ay...@yahoo.co.uk> on 2005/03/16 15:45:07 UTC

Problem with Tomcat caching old pages that it shouldn't

Hi,

Basically here's my problem: I make a jsp page that works correctly. 
OK.  Then, I make a fault in it that shows a compile error page -
also fine.

The problem is, when I reload it a second time, Tomcat serves me the
old compiled JSP scriptlet, instead of giving me the compile error
message again!

I have to wait 5 seconds for the correct error page to be displayed. 
If I click on refresh in less than 5 seconds after the previous
refresh, it gives me the old compiled page without the errors in it.

Note its not a web browser cache problem, or a proxy problem - that
much is certain.

Here's a thread at the Sun forums I have already posted to about this
issue:

http://forum.java.sun.com/thread.jspa?threadID=607293&tstart=0

Please peruse it, as the people there went through many stages with
me that I'm sure will help save you time in solving my problem.

Thanks,
         Asfand Yar


Send instant messages to your online friends http://uk.messenger.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Problem with Tomcat caching old pages that it shouldn't

Posted by Hassan Schroeder <ha...@webtuitive.com>.
Asfand Qazi wrote:

> Basically here's my problem: I make a jsp page that works correctly. 
> OK.  Then, I make a fault in it that shows a compile error page -
> also fine.
> 
> The problem is, when I reload it a second time, Tomcat serves me the
> old compiled JSP scriptlet, instead of giving me the compile error
> message again!

Yep, I've seen this too, on 5.5.7 -- hadn't spent any real time on
it, but...

> http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html
> 	cacheTTL

..the above sounds like a likely candidate, since it's obviously not
related to initial *loading* of changed classes.

Please post back the results of your testing :-)

-- 
Hassan Schroeder ----------------------------- hassan@webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Problem with Tomcat caching old pages that it shouldn't

Posted by Jason Bainbridge <jb...@gmail.com>.
On Wed, 16 Mar 2005 14:45:07 +0000 (GMT), Asfand Qazi
<ay...@yahoo.co.uk> wrote:
> Hi,
> 
> Basically here's my problem: I make a jsp page that works correctly.
> OK.  Then, I make a fault in it that shows a compile error page -
> also fine.
> 
> The problem is, when I reload it a second time, Tomcat serves me the
> old compiled JSP scriptlet, instead of giving me the compile error
> message again!
> 
> I have to wait 5 seconds for the correct error page to be displayed.
> If I click on refresh in less than 5 seconds after the previous
> refresh, it gives me the old compiled page without the errors in it.

Try adding:

<init-param>
            <param-name>modificationTestInterval</param-name>
            <param-value>0</param-value>
 </init-param>

to your definition of the JSP servlet in %TOMCAT_HOM#%\conf\web.xml

By default it is 4 seconds but I'm not sure why the compile would fail
once and then start  working again...

Regards,
-- 
Jason Bainbridge
http://kde.org - webmaster@kde.org
Personal Site - http://jasonbainbridge.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org