This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Servlets and the fly likes Again Cache Problem!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Again Cache Problem!!!" Watch "Again Cache Problem!!!" New topic
Author

Again Cache Problem!!!

Mahajan Bhupendra
Ranch Hand

Joined: Dec 01, 2000
Posts: 118
Hi all,
i have created online exam which gives u one questions at a
time. Previously i hadn't made the review of the questions
at the end. I was directly displaying results. Some people
give me suggestions that i should provide the way to user
so that before ending the exam he should be able to make
changes. So i added review page...
And now the problem begins...
priviously i was accessing one question only one time, now
since i m providing review facility i m accessing the pages
which are priviosly viewed. Now browser gives me the things
in cache. If i change the answer while reviewing next time
it's not showing me changed answer but the old one....
what should i do..
Is the same problem aries if i load it on internet???
Don't we have remedy on cache problems???
i m using resin server....
Thanx in advance..
Bhupendra


<B>Bhupendra Mahajan</B>
Samith Nambiar
Ranch Hand

Joined: Mar 14, 2001
Posts: 147
insert these lines ... should solve the problem
out.println("<html>");
out.println("<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">");
Samith.P.Nambiar
srivatsan srinivasan
Greenhorn

Joined: Jun 08, 2001
Posts: 26
just add response.setHeader("Pragma","No-Cache");
vikinsa
Ranch Hand

Joined: Apr 18, 2001
Posts: 46
Try
<META HTTP-EQUIV="Expires" CONTENT="now">
in the <head></head> tags of the html in the jsp.
place at the top most of your jso before anything
<%response.setHeader("Cache-Control","no-cache");%>
Originally posted by Mahajan Bhupendra:
Hi all,
i have created online exam which gives u one questions at a
time. Previously i hadn't made the review of the questions
at the end. I was directly displaying results. Some people
give me suggestions that i should provide the way to user
so that before ending the exam he should be able to make
changes. So i added review page...
And now the problem begins...
priviously i was accessing one question only one time, now
since i m providing review facility i m accessing the pages
which are priviosly viewed. Now browser gives me the things
in cache. If i change the answer while reviewing next time
it's not showing me changed answer but the old one....
what should i do..
Is the same problem aries if i load it on internet???
Don't we have remedy on cache problems???
i m using resin server....
Thanx in advance..
Bhupendra


------------------
Vikas Aggarwal
Technology Associate
http://www.vikinsa.com


Vikas Aggarwal<BR>Technology Associate<BR>http://www.vikinsa.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Again Cache Problem!!!