You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by mike danese <mi...@attbi.com> on 2003/01/28 22:56:31 UTC

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??

thanksk md


Re: tomcat authtentication

Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Tue, 28 Jan 2003, mike danese wrote:

> Date: Tue, 28 Jan 2003 13:56:31 -0800
> From: mike danese <mi...@attbi.com>
> Reply-To: Tomcat Users List <to...@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