Hi everyone,
Here is my question........  How can I force a log-on using HTTP authentication in my servlet. Currently, if a user logs off and tries to log on immediately after, he/she is not presented with the authentication dialog. I am using the
<resp.setStatus(HttpServletResponse.SC_UNAUTHORIZED) to capture usernname and password if initial try is invalid. Also, shouldn't <session.invalidate> destroy that session immediately?
I'm using ServletExec.......with Apache.
 
Code Snippet for session invalidation:
 
HttpSession session = req.getSession(true);
     if (session != null) {
        HttpSessionContext context = session.getSessionContext();
        HttpSession curSession = context.getSession("Login.User");
        if (curSession != null) curSession.invalidate();
     }
 
Any Suggestions.....
Antonio

Reply via email to