Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

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....
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???
I added the following headers in every *.jsp file
response.addHeader("Expires:","Mon, 01 Jan 2001 00:00:00 GMT");
response.addHeader("Cache-Control","no-cache, must-revalidate");
response.addHeader("Cache-Control","post-check=0, pre-check=0");
also i tried this
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
but the username and password fields still holds the can i reset this fields to default, is it possible!!!
I use IE Version 6.0.2800.1106
Best regards
howmad23 :-)
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!