It's not a secret anymore!*
The moose likes Servlets and the fly likes caching problem!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "caching problem!!!!" Watch "caching problem!!!!" New topic
Author

caching problem!!!!

vivek sivakumar
Ranch Hand

Joined: Aug 09, 2001
Posts: 187
MY situation:
i have 2 jsp pages , the first page is a login.jsp where a user name and password is authenticated , if correct then the next page show.jsp is revealed .
MY problemS:
1. if the user is authenticated then he goes into show.jsp( as i said above) but if he clicks the back button on the browser then the same page (show.jsp) appears on the browser but this is not sensible as the user should be taken to login.jsp !!! i suspect some caching happening here , how to rectify this.is there something to be corrected with sessions ??
i feel that every query should be made from server and not from the cache of browser but how to do it!!!
Any idea is welcomed with utmost gratitude!!!


SCJP, SCWD <br />A farmer learns more from a bad harvest than a good one.
padmanabh
Greenhorn

Joined: Jul 30, 2001
Posts: 6

hi
according to me what is happening in ur case, ur login page checks for some condition and redirects it to the show page, now when u r on the show page and u click on back button it will go to the login page and since u r already logged in (ur condition is true) it again takes u to the show page.
bye,
Padmanabh

Manohar Karamballi
Ranch Hand

Joined: Jul 17, 2001
Posts: 227
Hai!
U might placed the snippet that i suggested u in ur login page. First of all tell me about ur requirement.
Rgds
Manohar
vivek sivakumar
Ranch Hand

Joined: Aug 09, 2001
Posts: 187
hi thanks for the support , instead of probing thro the javascript i solved this problem by using Deployment descriptor(web.xml)which makes the things relatively easy !!!
vivek sivakumar
Ranch Hand

Joined: Aug 09, 2001
Posts: 187
if someone has a interest in this then just email me and i will be pleased to help you all!!! if u wait for sometime then i will be releasing a detailed NOTES regarding this deployment descriptor as all the web sites which deal with this havent got a good description which hopefully i will be making in a couple of days (perhaps in 2 weeks!!!)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: caching problem!!!!