Re: Obtain username from J_security_check
Richard Masters <[email protected]>
| Newsgroups | gmane.comp.java.sun.servlet |
|---|---|
| Message-ID | <[email protected]> |
That has done it. Thanks Richard >getUserPrincipal().getName() > >which returns a java.security.Principal object containing the name of the >current authenticated user. If the user has not been authenticated, the >method returns null. > > > > >>From: "Chan, Christopher" <[email protected]> >>Reply-To: "A mailing list for discussion about Sun Microsystem's Java >> Servlet API Technology." <[email protected]> >>To: [email protected] >>Subject: Re: Obtain username from J_security_check >>Date: Fri, 7 Mar 2003 07:40:41 +1100 >> >>Use the following to get the user: request.getRemoteUser(); >> >>Rgds, >>Chris >>-----Original Message----- >>From: Richard Masters [mailto:[email protected]] >>Sent: Thursday, 6 March 2003 20:22 PM >>To: [email protected] >>Subject: Obtain username from J_security_check >> >> >>Hello all, >> >>Im not sure if this is the correct mailing list for this question as it >>relates to the servlet container more than anything. >>I use "j_security_check" to allow users to log in to my website, and I >>would >>like to know how I can obtain the username of those who are successfully >>logged on. >> >>I have tried: >> >>String usrnme = request.getParameter("j_username"); >> >>but this returns null. >> >>Can anyone help >> >>Thanks in advance >>Richard _________________________________________________________________ Use MSN Messenger to send music and pics to your friends http://messenger.msn.co.uk ___________________________________________________________________________ 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