• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on caching of page

 
Robert Paris
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My pages are caching server side, I believe. here's what happens:
1. A person's session timesout
2. they try to access something and get kicked to log in page
3. they re-login, are authenticated and sent back to their home page
4. they click a link to go to the page they were on when the session timed out and it automatically acts as though they were still times out and kicks them to the log in page with the message that they were logged out!
What's going on?
 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it sounds as bad code. the jsp page will make a session check each time it requested... so it doesn't sound like a caching problem.. post your code here, we'll take look.
 
Robert Paris
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

It prints out the correct typeID, name and first name, yet it will throw the error. It only happens after:
1. the session times out {correct action]
2. then I either try to refresh the page or click something
3. It sends me to the login page [still correct]
4. I re-login and it accepts and sends me to the home page [correct]
5. I click to go back to that original page and it kicks me to log in with the error [INCORRECT!]
Then no matter how many times I repeat #4-5 it keeps kicking me out, until I change something on that page's JSP AND try to go DIRECTLY there. Then it recompiles it and then I can go there. I'm completely stumped.
 
Bhupinder Dhillon
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Maybe the expression is returning false.
 
Robert Paris
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah, except I'm printing it out and it's exactly the same. I even put a print statement that tests those two and it's "true".
 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, if you belive it's a matter of cache,
use
<% response.setHeader("cache-control","no-cache"); %>
<% response.setHeader("cache-control","no-cache"); %>
if this doesn't help- let's see all files in your entire authentication system. check if you don't remove an attribute from the session somewhere etc.etc.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic