aspose file tools*
The moose likes Servlets and the fly likes How the priciple created? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How the priciple created?" Watch "How the priciple created?" New topic
Author

How the priciple created?

surya sudhakar
Greenhorn

Joined: Jun 11, 2002
Posts: 18
Hi All,
When a person logs into webapplication , the user will be providing his credentials. At the later point of time we can get the user name from the principle which is there in Http request object. How come the user name gets populated in the principle, does the J2EE specification adderss any guideline so that the user name gets populated in the principle or is it an appserver specific configuration.
If at all this is a app server specific can anybody tell how to do that in WebSphere?
Thanks a lot,
Surya.
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Moving to the Servlet Forum...
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
"vydeek",
One more thing...
Welcome to JavaRanch. We don't have many rules here, but one that we do have is a naming policy. Please edit your display name to comply with this policy. Thanks in advance and we look forward to seeing you around the Ranch.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"sudhakar",
sorry, your diplay name is still not valid.
We require display names to be two words: your first name, a space, then your last name. Fictitious names are not allowed.
You can edit your display name here.
thanks,
Dave.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

The behaviour is partly defined in the spec and partly up to each app server. If you configure secured areas with user and role mappings, you create a login page and plug that into the app server so that the server knows how to get the user name and password.
You can also plug into this programatically, but the way this happens is different in each server. In WebSphere you'll need to look at the class SSOAuthenticator. If you search the WebSphere forum for this class you should be able to find more information. It is worth doing a search, since there is some very strange behaviour in WebSphere concerning authentication.
Dave
 
 
subject: How the priciple created?