wood burning stoves 2.0*
The moose likes JSP and the fly likes Logoff problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Logoff problem" Watch "Logoff problem" New topic
Author

Logoff problem

Nilesh Patel
Ranch Hand

Joined: Feb 02, 2006
Posts: 91
When i have logout from my jsp page and after press "BACK" button of browser it is display my old page but i want to display login page

So user can't see previous page after logout ....

i have used session and write session.invalidate() for logff.


Nilesh Patel
SCJP 1.5 - 87%
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Session really only exists on the server - when you push the "Back" button the web browser pulls the page out of the local cache. You'll need to use something to prevent the page from being cached locally like -


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Nilesh Patel
Ranch Hand

Joined: Feb 02, 2006
Posts: 91
i have tried but it is not working at my locale server but not working on hosting server...

hosting server is tomcat apache and jdk1.3
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Do a "View HTML source" on the page you are getting from your host server and see if the line is included. They may be placing your page into some kind of template or something that has a conflicting directive. Or they may do some kind of caching on their end that doesn't honor this directive, or they may filter things like this out of pages - no caching means higher bandwith usage on the hosting server.
Nilesh Patel
Ranch Hand

Joined: Feb 02, 2006
Posts: 91
I have checked web page source code from my server its including all metatag

likes ..

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<META HTTP-EQUIV="Cache-control" CONTENT="no-store">
<META HTTP-EQUIV="Cache-control" CONTENT="max-age=0">

Is some problem on my Hosting Server because its is good on local server?

Below is some parameter of server...

Java classpath : lib/tomcat.jar
Java class version number : 47.0
Java installation directory : /usr/local/jdk1.3.1/jre
Java vendor-specific string : Sun Microsystems Inc.
Java vendor URL : http://java.sun.com/
Java version number : 1.3.1-p7
Line separator :
Operating system architecture : i386
Operating system name : FreeBSD
Path separator (e.g., ":") : :
User's current working directory : /usr/local/tomcat
User home directory: /nonexistent
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Logoff problem
 
Similar Threads
Browser Closing without signout from site
Log out functionality
logout from page with frames
logout problem
Logout problem