File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Reload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Reload" Watch "Reload" New topic


Anurag Saxena

Joined: Oct 29, 2002
Posts: 13
How to force <href> tag to get jsp page from the server not from the cache? eg.,
<a href="LogoutVerification.jsp" target="rightframe"> <b>Logout</b>
every time you click logout hyperlink, it should go to server to grb the JSP page not from cache. How to do this?
Mani Ram
Ranch Hand

Joined: Mar 11, 2002
Posts: 1140
In the JSP, put the anti-cache code.
You have to set the anti-cache code in the response headers like this
response.setDateHeader ("Expires", 0);
The first line is used to for HTTP 1.1 protocol
the second line is used for HTTP 1.0.
The third line will prevent caching at the proxy servers.

Quaerendo Invenietis
Consider Paul's rocket mass heater.
subject: Reload
Similar Threads
logout issue
Unsure how to do subtraction using joined table values
logout problem
javascript called within JSP
controlling browsers back button