tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wise, Bowden (Research)" <wis...@crd.ge.com>
Subject RE: Let me try this again: tomcat returns cached file rather than updated file
Date Mon, 26 Aug 2002 14:11:45 GMT
Mike:
These are not JSP files, its just a regular file (its actually an XML file), that is being
downloaded
from a webapp directory via tomcat using a 
java URL connection from a servlet.

Non-jsp files are not stored in work
directory.  

>-----Original Message-----
>From: Mike Jackson [mailto:mjackson@cdi-hq.com]
>Sent: Friday, August 23, 2002 4:46 PM
>To: Tomcat Users List
>Subject: RE: Let me try this again: tomcat returns cached file rather
>than updated file
>
>
>Hmm, I don't think that tomcat does cache files.  Or at least I haven't
>seen that behavior in version 3.x which is what I use.  Are 
>you sure that
>you deleted everything (and all subdirectories) in the work directory?
>I've seen what you're describing, but it seemed to go away after I did
>that.  You might also try "touch"'ing all the jsp files so that it 
>forces a recompile, but if you clear the work directory it shouldn't
>need that.
>
>--mikej
>-=-----
>mike jackson
>mjackson@cdi-hq.com 
>
>> -----Original Message-----
>> From: Wise, Bowden (Research) [mailto:wisegb@crd.ge.com]
>> Sent: Friday, August 23, 2002 11:44 AM
>> To: 'Tomcat Users List'
>> Subject: RE: Let me try this again: tomcat returns cached file rather
>> than updated file
>> 
>> 
>> Cleaning out the work directory did not help.
>> I think only compiled classes go there, not sure
>> what tomcat does with cached files...
>> 
>> Bowden
>> 
>> >-----Original Message-----
>> >From: Mike Jackson [mailto:mjackson@cdi-hq.com]
>> >Sent: Friday, August 23, 2002 2:33 PM
>> >To: Tomcat Users List
>> >Subject: RE: Let me try this again: tomcat returns cached 
>file rather
>> >than updated file
>> >
>> >
>> >Try restarting tomcat after clearing out the "work" directory.
>> >
>> >--mikej
>> >-=-----
>> >mike jackson
>> >mjackson@cdi-hq.com
>> >
>> >> -----Original Message-----
>> >> From: Wise, Bowden (Research) [mailto:wisegb@crd.ge.com]
>> >> Sent: Friday, August 23, 2002 11:16 AM
>> >> To: 'Tomcat Users List'
>> >> Subject: RE: Let me try this again: tomcat returns cached 
>file rather
>> >> than updated file
>> >>
>> >>
>> >> Thanks for the response, Mike:
>> >>
>> >> Note this test was done within a java program -- outside
>> >> the browser -- so there is no browser at all, has to be
>> >> coming from Tomcat in response to the underlying HTTP GET
>> >> sent by the call to get the content by the java URL
>> >> object
>> >>
>> >> Bowden
>> >>
>> >> >-----Original Message-----
>> >> >From: Mike Jackson [mailto:mjackson@cdi-hq.com]
>> >> >Sent: Friday, August 23, 2002 2:11 PM
>> >> >To: Tomcat Users List
>> >> >Subject: RE: Let me try this again: tomcat returns cached 
>> >file rather
>> >> >than updated file
>> >> >
>> >> >
>> >> >Check your browser settings, make sure it's set to check 
>> >the cache on
>> >> >every page access.  It's probably the browser that's the problem.
>> >> >
>> >> >--mikej
>> >> >-=-----
>> >> >mike jackson
>> >> >mjackson@cdi-hq.com
>> >> >
>> >> >> -----Original Message-----
>> >> >> From: Wise, Bowden (Research) [mailto:wisegb@crd.ge.com]
>> >> >> Sent: Friday, August 23, 2002 10:54 AM
>> >> >> To: 'Tomcat Users List'
>> >> >> Subject: Let me try this again: tomcat returns cached file
>> >> >rather than
>> >> >> updated file
>> >> >>
>> >> >>
>> >> >> Hi
>> >> >>
>> >> >> Sorry for the multiple postings about this, but I am
>> >> >> baffled, and am surprised at the behavior...
>> >> >>
>> >> >> When using a java.net.URL to download a file on a
>> >> >> tomcat webapp, i am finding that I get the OLD content
>> >> >> rather than the new content
>> >> >>
>> >> >> I wrote a simple java test program:
>> >> >> - write "first" to the file (FileWriter)
>> >> >> - read the file (URL), verify "first" is read
>> >> >> - write "second" to the file (FileWriter)
>> >> >> - read the file (URL), should be "second" but gets "first"
>> >> >>
>> >> >> If I insert a pause (sleep call) before the second
>> >> >> write, the second read does correctly obtain "second"
>> >> >>
>> >> >> I also tested on an Apache accesible directory and
>> >> >> the problem does not appear, the second read correctly
>> >> >> returns "second" immediately
>> >> >>
>> >> >> Does the tomcat cache mechanism not work when there is
>> >> >> not sufficient elapsed times between file updates?
>> >> >>
>> >> >> I can't believe noone has noticed this
>> >> >>
>> >> >> Or is there something wrong with my configuration?
>> >> >>
>> >> >> Thanks
>> >> >> Bowden
>> >> >>
>> >> >>
>> >> >>
>> >> >> >-----Original Message-----
>> >> >> >From: Wise, Bowden (Research)
>> >> >> >Sent: Friday, August 23, 2002 7:40 AM
>> >> >> >To: 'Tomcat Users List'
>> >> >> >Subject: Why does TOMCAT return cache page when file has been
>> >> >> >modified??
>> >> >> >
>> >> >> >
>> >> >> >Hi
>> >> >> >
>> >> >> >Please review my original message below and let me know
>> >> >> >if you have seen this or know why it is happening
>> >> >> >
>> >> >> >thanks
>> >> >> >Bowden
>> >> >> >
>> >> >> >>-----Original Message-----
>> >> >> >>From: Wise, Bowden (Research)
>> >> >> >>Sent: Thursday, August 22, 2002 5:13 PM
>> >> >> >>To: 'tomcat-user@jakarta.apache.org'
>> >> >> >>Subject: Tomcat Retrieves old cached file after file update
>> >> >> >>
>> >> >> >>
>> >> >> >>Hi
>> >> >> >>
>> >> >> >>I am finding that Tomca4.0.3 is returning old cached content
>> >> >> >>even after the underlying file has been modified.
>> >> >> >>
>> >> >> >>I have a servlet and JSP that work together, the 
>> >servlet modifies
>> >> >> >>a file in a web accessible directory (via 
>FileWriter) and then
>> >> >> >>redirects to the JSP which uses a URL to read the content
>> >> >> >>of the file and display it.
>> >> >> >>
>> >> >> >>Once redirected, even though the file changed, the data

>> >displayed
>> >> >> >>is the old content.
>> >> >> >>
>> >> >> >>I wrote a simple program to test this further:
>> >> >> >>  write to the file
>> >> >> >>  read content
>> >> >> >>  write new content
>> >> >> >>  second read of content
>> >> >> >>
>> >> >> >>the second read always returns the first content when tested
>> >> >> >>under Tomcat but when testing on an Apache web server
>> >> >> >>this problem does not happen as the new content is always
>> >> >> >>returned.
>> >> >> >>
>> >> >> >>if I pause for 5 seconds between the first read and the
>> >> >> >>write of the new content, the latst data is obtained by
>> >> >> >>the second read...
>> >> >> >>
>> >> >> >>however, a pause of 1 second still reveals the old content
>> >> >> >>
>> >> >> >>Does the tomcat cache mechanism need a few seconds
>> >> >> >>before it realizes that a file has changed??
>> >> >> >>
>> >> >> >>Bowden
>> >> >> >>g GE Global Research Center
>> >> >> >>___________________________
>> >> >> >>G. Bowden Wise
>> >> >> >> <mailto:wisegb@research.ge.com> wisegb@research.ge.com
>> >> >> >>Information and Decision Technologies
>> >> >> >>GE Global Research Center
>> >> >> >>Building K1, Room 5B2C
>> >> >> >>PO Box 8                            | One Research Circle
>> >> >> >>Schenectady, NY 12301       | Niskayuna NY 12309
>> >> >> >>Phone: 518-387-7833           | Fax: 518-387-6104
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>Bowden
>> >> >> >>g GE Global Research Center
>> >> >> >>___________________________
>> >> >> >>G. Bowden Wise
>> >> >> >> <mailto:wisegb@research.ge.com> wisegb@research.ge.com
>> >> >> >>Information and Decision Technologies
>> >> >> >>GE Global Research Center
>> >> >> >>Building K1, Room 5B2C
>> >> >> >>PO Box 8                            | One Research Circle
>> >> >> >>Schenectady, NY 12301       | Niskayuna NY 12309
>> >> >> >>Phone: 518-387-7833           | Fax: 518-387-6104
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >--
>> >> >> >To unsubscribe, e-mail:
>> >> >> ><mailto:tomcat-user->unsubscribe@jakarta.apache.org>
>> >> >> >For
>> >> >> >additional commands,
>> >> >> >e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> To unsubscribe, e-mail:
>> >> ><mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>> >> >For additional commands, e-mail:
>> >> ><mailto:tomcat-user-help@jakarta.apache.org>
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >--
>> >> >To unsubscribe, e-mail:
>> >> ><mailto:tomcat-user->unsubscribe@jakarta.apache.org>
>> >> >For
>> >> >additional commands,
>> >> >e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
>> >> >
>> >>
>> >> --
>> >> To unsubscribe, e-mail:
>> ><mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>> >For additional commands, e-mail:
>> ><mailto:tomcat-user-help@jakarta.apache.org>
>> >
>> >
>> >
>> >--
>> >To unsubscribe, e-mail:   
>> ><mailto:tomcat-user->unsubscribe@jakarta.apache.org>
>> >For 
>> >additional commands, 
>> >e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
>> >
>> 
>> --
>> To unsubscribe, e-mail:   
>> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail: 
>> <mailto:tomcat-user-help@jakarta.apache.org>
>> 
>
>
>--
>To unsubscribe, e-mail:   
><mailto:tomcat-user->unsubscribe@jakarta.apache.org>
>For 
>additional commands, 
>e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
>

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


Mime
View raw message