Two Laptop Bag*
The moose likes Servlets and the fly likes logout 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 » Servlets
Bookmark "logout problem" Watch "logout problem" New topic
Author

logout problem

vijayakumar durai
Ranch Hand

Joined: Aug 18, 2008
Posts: 153
in my application i provide link for logout.if user clicking the logout .i am invalidating the session in logout.jsp and redirect to index.jsp

i am not able to set the value in session

can anybody tell how display message (successfully logout) to user in index.jsp and remove the message is there any other way to set and remove the message to user
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


i am not able to set the value in session

What value are you trying to set?


can anybody tell how display message (successfully logout) to user in index.jsp and remove the message is there any other way to set and remove the message to user

Not sure what you are trying to do here. I would guess the sensible thing to sdo would be to redirect the user to a logout page with this message and a link to click back to the login page?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
vijayakumar durai
Ranch Hand

Joined: Aug 18, 2008
Posts: 153
after invalidating session i am setting the value session in successfully logout its giving error is there any other way to set the value to display to user?
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
What we normally do is
1. set the value at successful login-validation
2. Check it all the time (possibly on every page) for the value to be in session
3. Remove/invalidate session during logout.


Originally posted by vijayakumar durai:
...after invalidating session i am setting the value session in successfully logout ...


if you have invalidated the session what are you trying set again and why?


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
vijayakumar durai
Ranch Hand

Joined: Aug 18, 2008
Posts: 153
i have to display success fully logout to the user.
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
Are you trying to set error message in session after invalidating it?


if you have invalidated the session what are you trying set again...

http://faq.javaranch.com/java/TellTheDetails
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: logout problem
 
Similar Threads
Can i call filter after particulate event?
Kyle!plz help!!
Removing session
how to kill a session
Restrict Login from Multiple Sessions