File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Question about login-config Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Question about login-config" Watch "Question about login-config" New topic
Author

Question about login-config

Win Yu
Ranch Hand

Joined: Oct 17, 2001
Posts: 224
Which of the following XML frgaments correctly define the login-config element of web.xml?
1.
<login-config>
<auth-method>CLIENT-CERT</auth-method>
<realm-name>test</realm-name>
</login-config>
2.
<login-config>
<auth-method>CLIENT-CERT</auth-method>
<realm-name>test</realm-name>
<form-login-config>
<form-login-page>/jsp/login.jsp</form-login-page>
<form-error-page>/jsp/error.jsp</form-error-page>
</form-login-config>
</login-config>

3.
<login-config>
<auth-method>FORM</auth-method>
<realm-name>test</realm-name>
<form-login-config>
<form-login-page>/jsp/login.jsp</form-login-page>
<form-error-page>/jsp/error.jsp</form-error-page>
</form-login-config>
</login-config>
4.
<login-config>
<auth-method>FORM</auth-method>
<realm-name>test</realm-name>
</login-config>
5.
<login-config>
<auth-method>SECURE</auth-method>
<realm-name>test</realm-name>
</login-config>
The answer given is 1,2,3. Why 2 is correct?

Win
Gagan Indus
Ranch Hand

Joined: Feb 28, 2001
Posts: 346
depends upon what is their definition of correct
i say 2 might be correct [ in the sense that it will work ] , but it is not appropriate for sure
------------------
Gagan (/^_^\) SCJP2
Die-hard JavaMonk -- little Java a day , keeps u going .


Gagan (/^_^\) SCJP2 SCWCD IBM486 <br />Die-hard JavaMonk -- little Java a day, keeps you going.<br /><a href="http://www.objectfirst.com/blog" target="_blank" rel="nofollow">My Blog</a>
Win Yu
Ranch Hand

Joined: Oct 17, 2001
Posts: 224
I do find some problem in JWeb+'s mock test. Did they ever check it. I doubt.
Paul Anilprem
Enthuware Software Support
Ranch Hand

Joined: Sep 23, 2000
Posts: 3285
    
    7
It's QID is 996515982693
For option 2, it says:
For CLIENT-CERT, <form-login-config> is not needed. But it's not wrong if present.

It possible to have some problems and we apologise for it. We do try our best to resolve them but nobody is perfect. Please do continue to help us by reporting any problems that you may encounter.
thanks,
Paul.
------------------
SCJP2, SCWCD Resources, Free Question A Day, Mock Exam Results and More!
www.jdiscuss.com
Get Certified, Guaranteed!
JQPlus - For SCJP2
JWebPlus - For SCWCD
JDevPlus - For SCJD


Enthuware - Best Mock Exams and Questions for Oracle/Sun Java Certifications
Quality Guaranteed - Pass or Full Refund!
Timber Lee
Ranch Hand

Joined: Oct 14, 2002
Posts: 157
what is meaning of </realm-name> and how to use it?


SCJP<br />SCWCD<br />SCEA
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about login-config