File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Logoff application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Logoff application" Watch "Logoff application" New topic
Author

Logoff application

Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 261
I have done the logoff application by adding the following line


but after I clicked on logoff button its is working fine and redirecting to home page, then after i click on the back button in the browser, the previous functionality is still working. what would I do to prevent the previous functionality? or else is there any chances to lock the previous page?


Thanks,
Kumar
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61209
    
  66

Logging off will do nothing to prevent pages from being served from cache. Be sure to use the techniques described in the JSP FAQ for preventing your pages from being cached.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Shaik Vali
Greenhorn

Joined: Feb 07, 2008
Posts: 22
Hi , this may be related to Cache memory
please try the following code in jsp pages

<% response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader("Expires", 0);
response.setHeader("Cache-Control","no-store"); //HTTP 1.1

%>
All the best
Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 261
hi shaik,

do i need to put the above code in all JSPs? only login.jsp?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61209
    
  66

Keep such goo out of the JSP. Investigate the use of a filter.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Logoff application