I'm trying to user WWW-Authentication with my servlet.  Basically, I can get
the client to pop up a user-password window, but I can't get that
information from the HttpServletRequest object.  This is what I am using to
test...


String remote_user = req.getRemoteUser();
if(remote_user == null || remote_user.equals(""))
{
  resp.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
  resp.setHeader("WWW-Authenticate", "Basic realm=\"Mike's World of Test
Servlet"\"");
}

In the first iteration, I expect remote_user to be null or "".  I then set
the authenticate header.  Then the client browser pops up the user-password
window.  I type something in and hit OK.  I now am expecting the remote_user
to be non-null and not "".  However, this doesn't happen and remote_user is
always null.  How do I get the information out of the request object.

Michael

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to