tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: tomcat authtentication
Date Wed, 29 Jan 2003 07:24:57 GMT

On Tue, 28 Jan 2003, mike danese wrote:

> Date: Tue, 28 Jan 2003 13:56:31 -0800
> From: mike danese <mikedanese@attbi.com>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: tomcat authtentication
>
> Trying to get a handle on how tomcat &or tomcat-manager interact w/ InternetExplorer
usr/passwd dialog box.
> I know that setting tomcat/catalina/server xml config files can invoke the IE usr/pswd
dialog box, but how
> is the underlying code acomplishing it.  Docs on apache/jakarta say "fix-me' on this
issue.
> Could anyone give an example of how to popup an IE/mozilla usr/pswd dialog from a jsp
or a bean??
>

Presuming that you've used BASIC as your <login-method>, this will do the
trick:

  response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
  return;

which is pretty much what Tomcat's authenticator does if you ask for a
protected resource and have not logged in yet.

For more information on how basic authentication works, see:

  http://www.rfc-editor.org/rfc/rfc2617.txt

> thanksk md

Craig


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message