Announcement Announcement Module
Collapse
No announcement yet.
Logout when Session expired trigger NullPointerException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Logout when Session expired trigger NullPointerException

    I've been configured a handler for logout

    Code:
    <logout delete-cookies="true"  invalidate-session="true" 
                success-handler-ref="customLogoutSuccessHandler"/>
    In method onLogoutSuccess of my handler class "CustomLogoutSuccessHandler" I've following

    Code:
    @Override
    	public void onLogoutSuccess(HttpServletRequest request,
    			HttpServletResponse response, Authentication authentication)
    			throws IOException, ServletException{
    		// TODO Auto-generated method stub
    		System.out.println("logout");
    		
    		//code
    	}
    I used the authentication object, but when session expired this object is null, so that I can't use it .

    In logout I need the user stored within the authentication object. When the session expired, How do I get it?
    Last edited by Cesar M. Casasola; Jan 15th, 2013, 09:52 AM.
Working...
X