Re: Problem with cache clearing in Tomcat

2002-03-26 Thread Jeff Larsen

You may also want to try

META http-equiv=Expires content=0

However, I don't really trust META tags. Browser implementations
of META tags are not always reliable. Write to the response headers
directly. I embed the following at the top of every jsp page.

%
 response.setHeader(Cache-Control, no-cache);
 response.setHeader(Pragma, no-cache);
 response.setDateHeader(Expires, 0);
%

If you're not using jsp, you could also put this in your servlet code.

However, during the development of my latest web app, I had similar cache
problems while running under Tomcat 3.2.3 standalone. In my production environment
however, I run Apache 1.3.23 with mod_jk to connect to Tomcat 4.0.3 and my cache
problems went away. I'm not sure if it's a Tomcat version issue or if Tomcat's
standalone HTTP connector just doesn't handle the headers correctly.

Good luck,

Jeff


- Original Message -
From: somya_iyer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 26, 2002 3:58 AM
Subject: Problem with cache clearing in Tomcat


 Hi,
 I'm using apache tomcat 4.0 and my application has been developed using only servlets
and an oracle database. After a user logs out, when the next one logs in,  the 
application
continues with the old pages belonging to the previous user. The old session has been
invalidated and the new session values are being correctly taken by the system. On
refreshing the screen, the correct pages come up. I have tried setting the header
information as follows:
 meta http-equiv=pragma content=no-cache
  meta http-equiv=cache-control content=no-store
 but this doesn't help either.
 Can anyone help out?
 Thanks,
 Somya

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Problem with cache clearing in Tomcat

2002-03-26 Thread Soefara Redzuan

To first check whether it's a browser or Tomcat server problem, go to 
another computer on your nework that has not yet been used to view the 
offending JSP/servlet. If you find you're still viewing an older version of 
the page, then it's obviously caching on the server. I've found that 9 times 
out of 10 it's Tomcat caching and not browser caching. If it's Tomcat 
caching then the META tags or pragma-no-cache will not help.

There's the reloadable=false (or should it be true? I have to check) 
parameter for the context in server.xml. But even that has not helped for me 
and I have to just delete the /work directory whenever I want to reload 
things. Be careful not to delete something in the webapps directory by 
mistake. That can really ruin your day.

Soefara.


From: Jeff Larsen [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: Problem with cache clearing in Tomcat
Date: Tue, 26 Mar 2002 09:29:48 -0600

You may also want to try

META http-equiv=Expires content=0

However, I don't really trust META tags. Browser implementations
of META tags are not always reliable. Write to the response headers
directly. I embed the following at the top of every jsp page.

%
  response.setHeader(Cache-Control, no-cache);
  response.setHeader(Pragma, no-cache);
  response.setDateHeader(Expires, 0);
%

If you're not using jsp, you could also put this in your servlet code.

However, during the development of my latest web app, I had similar cache
problems while running under Tomcat 3.2.3 standalone. In my production 
environment
however, I run Apache 1.3.23 with mod_jk to connect to Tomcat 4.0.3 and my 
cache
problems went away. I'm not sure if it's a Tomcat version issue or if 
Tomcat's
standalone HTTP connector just doesn't handle the headers correctly.

Good luck,

Jeff


- Original Message -
From: somya_iyer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 26, 2002 3:58 AM
Subject: Problem with cache clearing in Tomcat


  Hi,
  I'm using apache tomcat 4.0 and my application has been developed using 
only servlets
and an oracle database. After a user logs out, when the next one logs in,  
the application
continues with the old pages belonging to the previous user. The old 
session has been
invalidated and the new session values are being correctly taken by the 
system. On
refreshing the screen, the correct pages come up. I have tried setting the 
header
information as follows:
  meta http-equiv=pragma content=no-cache
   meta http-equiv=cache-control content=no-store
  but this doesn't help either.
  Can anyone help out?
  Thanks,
  Somya
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Problem with cache clearing in Tomcat

2002-03-26 Thread todd tredeau

I found this issue seemed to have gone away for me, when I tried newest 
4.1 and JMX  enabled

Hope this helps

todd
http://www.wiserlabz.com
collaborative effort to promote Novell and Open Source solutions

Soefara Redzuan wrote:

 To first check whether it's a browser or Tomcat server problem, go to 
 another computer on your nework that has not yet been used to view the 
 offending JSP/servlet. If you find you're still viewing an older 
 version of the page, then it's obviously caching on the server. I've 
 found that 9 times out of 10 it's Tomcat caching and not browser 
 caching. If it's Tomcat caching then the META tags or pragma-no-cache 
 will not help.

 There's the reloadable=false (or should it be true? I have to 
 check) parameter for the context in server.xml. But even that has not 
 helped for me and I have to just delete the /work directory whenever 
 I want to reload things. Be careful not to delete something in the 
 webapps directory by mistake. That can really ruin your day.

 Soefara.


 From: Jeff Larsen [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: Problem with cache clearing in Tomcat
 Date: Tue, 26 Mar 2002 09:29:48 -0600

 You may also want to try

 META http-equiv=Expires content=0

 However, I don't really trust META tags. Browser implementations
 of META tags are not always reliable. Write to the response headers
 directly. I embed the following at the top of every jsp page.

 %
  response.setHeader(Cache-Control, no-cache);
  response.setHeader(Pragma, no-cache);
  response.setDateHeader(Expires, 0);
 %

 If you're not using jsp, you could also put this in your servlet code.

 However, during the development of my latest web app, I had similar 
 cache
 problems while running under Tomcat 3.2.3 standalone. In my 
 production environment
 however, I run Apache 1.3.23 with mod_jk to connect to Tomcat 4.0.3 
 and my cache
 problems went away. I'm not sure if it's a Tomcat version issue or if 
 Tomcat's
 standalone HTTP connector just doesn't handle the headers correctly.

 Good luck,

 Jeff


 - Original Message -
 From: somya_iyer [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, March 26, 2002 3:58 AM
 Subject: Problem with cache clearing in Tomcat


  Hi,
  I'm using apache tomcat 4.0 and my application has been developed 
 using only servlets
 and an oracle database. After a user logs out, when the next one logs 
 in,  the application
 continues with the old pages belonging to the previous user. The old 
 session has been
 invalidated and the new session values are being correctly taken by 
 the system. On
 refreshing the screen, the correct pages come up. I have tried 
 setting the header
 information as follows:
  meta http-equiv=pragma content=no-cache
   meta http-equiv=cache-control content=no-store
  but this doesn't help either.
  Can anyone help out?
  Thanks,
  Somya
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]


 -- 
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]



 _
 Chat with friends online, try MSN Messenger: http://messenger.msn.com


 -- 
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]






--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Problem with cache

2001-03-01 Thread William Brogden



 matteo belloni wrote:
 
 I've a servlet that write on a file.
 If the Tomcat is running the first time the application rewrite the
 file, the other time this file is appended but, If I first shutdown
 the webserver, the information in a file isn't appended and the
 application function correctly.
 This appen because this file is keeping in the web server's cache.
 How can I solve this problem and writing every time on a file instead
 of append the information? I must modify web.xml? And how?
 Please help me.
 Thanks in advance

Sounds to me like you are not flushing and/or closing the file.

-- 
WBB - [EMAIL PROTECTED]
Java Cert mock exams http://www.lanw.com/java/javacert/
Author of Java Developer's Guide to Servlets and JSP 
ISBN 0-7821-2809-2

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Problem with cache

2001-03-01 Thread matteo belloni

No  I close it and after rewriting  I deleted it and this file appear really
deleted but Tomcat mantain it in cache so my deletion is inutil.
Thanks
Theo
- Original Message -
From: "William Brogden" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 01, 2001 1:52 PM
Subject: Re: Problem with cache




  matteo belloni wrote:
 
  I've a servlet that write on a file.
  If the Tomcat is running the first time the application rewrite the
  file, the other time this file is appended but, If I first shutdown
  the webserver, the information in a file isn't appended and the
  application function correctly.
  This appen because this file is keeping in the web server's cache.
  How can I solve this problem and writing every time on a file instead
  of append the information? I must modify web.xml? And how?
  Please help me.
  Thanks in advance

 Sounds to me like you are not flushing and/or closing the file.

 --
 WBB - [EMAIL PROTECTED]
 Java Cert mock exams http://www.lanw.com/java/javacert/
 Author of Java Developer's Guide to Servlets and JSP
 ISBN 0-7821-2809-2

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Problem with cache

2001-03-01 Thread William Brogden

Tomcat does not cache files as such. Your problem must
come from a different source.

matteo belloni wrote:
 
 No  I close it and after rewriting  I deleted it and this file appear really
 deleted but Tomcat mantain it in cache so my deletion is inutil.
 Thanks
 Theo
 - Original Message -
 From: "William Brogden" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, March 01, 2001 1:52 PM
 Subject: Re: Problem with cache
 
 
 
   matteo belloni wrote:
  
   I've a servlet that write on a file.
   If the Tomcat is running the first time the application rewrite the
   file, the other time this file is appended but, If I first shutdown
   the webserver, the information in a file isn't appended and the
   application function correctly.
   This appen because this file is keeping in the web server's cache.
   How can I solve this problem and writing every time on a file instead
   of append the information? I must modify web.xml? And how?
   Please help me.
   Thanks in advance
 
  Sounds to me like you are not flushing and/or closing the file.
 
  --
  WBB - [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Problem with cache

2001-03-01 Thread matteo belloni

Thanks
Theo
- Original Message -
From: "William Brogden" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 01, 2001 3:34 PM
Subject: Re: Problem with cache


 Tomcat does not cache files as such. Your problem must
 come from a different source.

 matteo belloni wrote:
 
  No  I close it and after rewriting  I deleted it and this file appear
really
  deleted but Tomcat mantain it in cache so my deletion is inutil.
  Thanks
  Theo
  - Original Message -
  From: "William Brogden" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, March 01, 2001 1:52 PM
  Subject: Re: Problem with cache
 
  
  
matteo belloni wrote:
   
I've a servlet that write on a file.
If the Tomcat is running the first time the application rewrite the
file, the other time this file is appended but, If I first shutdown
the webserver, the information in a file isn't appended and the
application function correctly.
This appen because this file is keeping in the web server's cache.
How can I solve this problem and writing every time on a file
instead
of append the information? I must modify web.xml? And how?
Please help me.
Thanks in advance
  
   Sounds to me like you are not flushing and/or closing the file.
  
   --
   WBB - [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]