Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What to the holy cache is that???  RSS feed

 
Hrvoje Canzek
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi together :-)
i have a J2EE Application running on WebSphere App.Server V5. I use a FrontController (a servlet)wich handles the login procedure and session management. For example there are three jsp pages....
login.jsp
start.jsp
denied.jsp
Every request goes through the FrontController!!!
Now my problem...
when i enter username and password into the form on login.jsp and press enter the data goes to FrontController wich takes the username and password and checks it. when everything is allright a new session is created (in the FrontController) and the requested site is displayed (start.jsp).
Some smoked cigarettes later, the session is timed out...when i refresh start.jsp a new session is created, because the username and password are cached. I DON'T WANT THAT. How can i solve this???
Infos:
I added the following headers in every *.jsp file
<%response.reset();
response.addHeader("Expires:","Mon, 01 Jan 2001 00:00:00 GMT");
response.addHeader("Pragma","no-cache");
response.addHeader("Cache-Control","no-cache, must-revalidate");
response.addHeader("Cache-Control","post-check=0, pre-check=0");
response.addHeader("Cache-Control","private");
%>
also i tried this
<%
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
%>
but the username and password fields still holds the informations....how can i reset this fields to default, is it possible!!!
I use IE Version 6.0.2800.1106
THANK YOU
Best regards
howmad23 :-)
 
Tim Baker
Ranch Hand
Posts: 541
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to specify the timeout use setMaxInactiveInterval(int interval) on the session object (in seconds)
also i suspect that saving the values of the login fields is being done client side (ie on your browser) so you disable this in internet options.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!