Invalidating a session in jsp

Thanks Are you using just the existence of a session to determine whether a user is logged in?It's a lot easier to keep a variable in the session (like the user ID for example) to tell you that.This could be something like If "Rest of login logic" defines how you validate username and password, the above code structure says something like "First sign in the user no matter what username and password are entered, and only then check if the given username and passwords are valid". The use of Name is a bad practice as I suspect that the above method is declared in a servlet class, which means you defined user Name to be an attribute variable of that servlet.If "Rest of login logic" defines how you validate username and password, the above code structure says something like "First sign in the user no matter what username and password are entered, and only then check if the given username and passwords are valid". The use of Name is a bad practice as I suspect that the above method is declared in a servlet class, which means you defined user Name to be an attribute variable of that servlet.Hi, I'm trying to logout from my application by clearing the Acegi security context and killing the session in order to clear my session-scope spring-based application beans but the navigation back to the login page doesn't (perhaps not that surprising) work after that.Is there any way of redirecting from within ICEfaces?Writing a javascript heartbeart in the page which redirects after some timeout?

Are you using just the existence of a session to determine whether a user is logged in?

I just don't know where that try Login(-) method resides so I don't know what 'this' refers to.

There is nothing wrong with using 'this' at all, but I suspect that you are storing an object of the user as an attribute (instance variable) of your servlet.

A servlet gets instantiated only once in the lifetime of servlet context, so you should not store anything related to session data in a servlet.

In simple words, if "this" is a servlet, "Name" is always same despite who the user is and where the request comes from.

Search for invalidating a session in jsp:

invalidating a session in jsp-20invalidating a session in jsp-77invalidating a session in jsp-84

any more: This must be because I am assigning username and password directly from the Parameter("username") call at the beginning of my login Servlet.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “invalidating a session in jsp”

  1. For more information about the terms of your profile’s extended visibility, click here. Meet singles through a shared interest at one of our many activities or over a drink at one of our free drinks events. Broad visibility of your profile: By creating your profile on Match, it will be visible on the local variants of our service which use the same platform operated under different brand names.