the method will return null if the user is not authenticated.  There is also the 
method


java.security.principal user = HttpServletRequest.getUserPrincipal() which 
returns the current user (if logged in).

have a read of the "security" chapter of the servlet spec (chapter 11 in 2.2, 
chapter 12 in 2.3).  This tells you how to configure your web app to require 
authentication to access certain resources.

LORENA MASSIMO wrote:

> hi everibody,
> 
> i'm developing for myintranet a web app based on apache/tomcat/struts.
> My users are using NT Wks on a NT Domain.
> I'm trying to auto-authenticate the users using the NT Logon User.
> 
> Somebody told me to use the following jsp code
> String logon_user = Request.ServerVariables("LOGON_USER");
> but the class Request is unknown in Tomcat (ok with JRUN)
> 
> Somebody told me to use the following code
> String logon_user = request.getRemoteUser();
> but it return null (or empty String)
> 
> Can anybody suggest me any other solutions?
> 
> Thanks MaxL

Reply via email to