Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jsp Cache 1

Status
Not open for further replies.

javaBeginner

Technical User
Jan 27, 2004
5
IE
I have a Jsp files that displays some elements of an xml file. When i remove an element of the xml file and i reload the jsp file the element that i removed before still appears.
I am using resin web server, and when i shut it down and then turn it on the element disapears.
Is there a solution to this problem??
I have tried lots of different ways but none of them had work.
excuse my english please.
 
There is no solution. :-(
Sorry, but that's life.
Some people will say to turn off the browser's catch, but that doesn't work. "and everything under the sun is in tune
but the sun is eclipsed by the moon." --Pink Floyd: Eclipse


"I'm going to spend eternity
reinstalling Windows." --Reinstalling Windows: by some British guy
 
maybe you could try this...
just add this piece of code to your jsp file diplaying the xml file and let me know if it works..
<%
response.setHeader(&quot;Cache-Control&quot;,&quot;no-cache&quot;);
response.setHeader(&quot;Pragma&quot;,&quot;no-cache&quot;);
//prevents caching at the proxy server
response.setDateHeader (&quot;Expires&quot;, 0);
%>

 
or you could try to add this piece of code into your html..
<html>
<head>
<meta http-equiv=&quot;Expires&quot; CONTENT=&quot;0&quot;>
<meta http-equiv=&quot;Cache-Control&quot; CONTENT=&quot;no-cache&quot;>
<meta http-equiv=&quot;Pragma&quot; CONTENT=&quot;no-cache&quot;>
</head>
let me know if it works...
 
none of it worked...i do not know what the heck is happening...maybe is the web server...ia am using esine web server
 
i just went through some details about the resin webserver..
i found that &quot;Sessions should be disabled for caching.&quot;
Now in your case u want to avoid caching..
so u can as well enable sessions in your program to avoid the problem..
try and let me know..
 
Ok i guess that aint gonna be the solution...
i dont know much about Resin ...
but as for weblogic...everytime i make changes to the jsp..
it is re-compiled and then loaded...
guess that does not happen with resin...
maybe the server keeps the old copy of the code until u re-start the server..
I guess GT500FOMOCO is right ....
 
Resin does recompile pages, the problem is that the JSP is not changing. The page that is changing is an XML document.

My question is: Is the XML document being included or is it being parsed thru Java in the JSP page?

Since I don't fully understand what action is taking place I can only have one minor suggestion: Force a recompilation of the JSP page by making a small change (like adding or deleting a space). Wushutwist
 
I am parsing the xml file in the jsp page...
When i modify an elemnt an i refresh the jsp page i works fine. I am having trouble when i remove an element o the xml file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top