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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a servlet that submits to an

Status
Not open for further replies.

vkarthik

Programmer
Aug 30, 2001
126
US
I have a servlet that submits to another servlet. This 2nd servlet doesnt have any user interface, but just processes the form, updates the database and redirects to the original servlet.

The problem is, the original servlet is being displayed from cache, so the fields updated by the 2nd servlet are not displayed. I have to refresh it manually to see the changes.

Is there a way to refresh the original servlet while redirecting it from the 2nd?

I used sendRedirect() for redirecting. I've also tried having statement like response.setDateHeader("Expires",0) but didnt work.

Plz help.

luv
Karthik. LOL A ship is safe in the harbour, but that's not what it is meant for!!! LOL
 
Try:
Code:
response.addHeader("Pragma","no-cache");
response.addHeader("Cache-Control","no-cache");
response.addHeader("Expires","1");
 
It didnt work. Infact it threw some exceptions like 'No such method... bla bla bla...". But it compiled fine.

Anyway thanx for ur help.

LOL A ship is safe in the harbour, but that's not what it is meant for!!! LOL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top