This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes DD entries for authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "DD entries for authentication" Watch "DD entries for authentication" New topic
Author

DD entries for authentication

Amruth Puppala
Ranch Hand

Joined: Jul 14, 2008
Posts: 295
As per my understanding ony BASIC aunthentication should have realm-name tag

see the following entries in web.xml . are these correct or not.


<login-config>
<auth-method>BASIC</auth-method>
<realm-name>User Auth</realm-name>
</login-config>


<login-config>
<auth-method>DIGEST</auth-method>
<realm-name>User Auth</realm-name>
</login-config>

<login-config>
<auth-method>CLIENT-CERT</auth-method>
<realm-name>User Auth</realm-name>
</login-config>

<login-config>
<auth-method>FORM</auth-method>
<realm-name>User Auth</realm-name>
<form-login-config>
<form-login-page>login.jsp</form-login-page>
<form-error-page>error.jsp</form-error-page>
</form-login-config>
</login-config>


SCJP 5 |SCWCD 5| Started thinking about Web Services ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41089
    
  44
<realm-name> is optional. If it's present then it's displayed in the dialog box asking for the credentials.


Ping & DNS - my free Android networking tools app
Amruth Puppala
Ranch Hand

Joined: Jul 14, 2008
Posts: 295
Originally posted by Ulf Dittmer:
<realm-name> is optional. If it's present then it's displayed in the dialog box asking for the credentials.



So can we use <realm-name> in any of authentication type?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41089
    
  44
Yes. Of course, if there's no dialog box (like for form and client-cert auth), then it doesn't get displayed.
Amruth Puppala
Ranch Hand

Joined: Jul 14, 2008
Posts: 295
Thanks lot
 
wood burning stoves
 
subject: DD entries for authentication
 
Similar Threads
Sample web.xml.. may be useful for SCWCD Ranchers
j_security_check 404 error
BASIC - FORM - DIGEST - CLIENT CERT In Deployment Descriptor
Question about login-config
mock test question