GeeCON Prague 2014*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "authentication" Watch "authentication" New topic
Author

authentication

Don Bosco
Ranch Hand

Joined: Oct 31, 2002
Posts: 108
Can we use more than one kind of authentication for an application. Like
servlet1 - FORM authentication
servlet2 - BASIC authentication
assuming servlet1 and servlet2 both belong to same application.


SCJP 1.4<p>Wingardium Leviosa!!
sean cee
Ranch Hand

Joined: Oct 24, 2000
Posts: 115
Don,
I don't think you can since <login-config> is the element that specifies what authentication mechanism to use. and it is the direct child of <web-app> and the cardinality is 0 or 1.
So for a given application you can only use one authentication mechanism.
Correct me if I am wrong anyone.
Thanks
Sean


Sean <br />SCJP2, SCJP2p1.4, SCWCD
Mike Burnham
Greenhorn

Joined: Jun 06, 2001
Posts: 24
Let me know if I am wrong but couldn't different web apps have different web.xml files? In that case, couldn't the authentication be different for these two apps?
Does authentication have to be the same for two servlets in the same web app?


SCJP 1.2
Rama Raghavan
Ranch Hand

Joined: Aug 22, 2001
Posts: 116
Authentication is to validate credentials of the client/user accessing the web-app.
Once authenicated, user may be authorized to access certain resources and not others.
Authentication is done once for the entire app, and each web-app would have its own web.xml to specify the Authentication method.
So - I guess, I don't see a reason why servlets should care about Authentication mechanism....
[ December 06, 2002: Message edited by: Rama Raghavan ]
[ December 06, 2002: Message edited by: Rama Raghavan ]

Rama Raghavan<br />SCJP2<br />SCWCD
 
GeeCON Prague 2014
 
subject: authentication