![]() |
| ||
| How to logout!!! public class logout extends HttpServlet {session is still alive!!! |
| ||
| Re: How to logout!!! no. But when you go to that JSP you immediately create a new session :) |
| ||
| Re: How to logout!!! can you give an example? |
| ||
| Re: How to logout!!! well u could logout by using these methods 1) using the session.invalidate(); 2) restricting the user from using the login details (when using the back button) by refreshing the page. 3) Using the sessionAccessTime......... The first method does get you out of the session ............ provided you have used the session='true' [for jsp pages] or HttpSession s=request.getSession(true) [in servlet this code works in the jsp in <% %>tag] in the first page and using false in the rest of the pages as it wont create the new sessions.................. but this method is ineffective as the browser has a back button................. if you want to know more about doing a proper logout you can write to me |
| ||
| Re: How to logout!!! Quote:
I had read what you have discussed here. I am facing same problem what you had. If any suggestion or help that will be appreciated. |
| ||
| Re: How to logout!!! Quote:
is to session.setAttribute(null,"sessionname"); |
| ||
| session.invalidate(); will do the job.....we should have conditions to check if the session-attributes are present in every page except the login page.... or session.removeAttribute(); will also do the job...if you remove all the attributes...:) |
| All times are GMT -4. The time now is 6:39 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC