wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes mock test question 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 "mock test question" Watch "mock test question" New topic
Author

mock test question

trupti nigam
Ranch Hand

Joined: Jun 21, 2001
Posts: 613
Question ID :996515982693
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>
Correct answers given are 1,2,3 but realm name is used only in case of BASIC authorization,so in that case how come 1 and 2 can be correct answers??
thanks,
Trupti
Hafizur Rahman
Ranch Hand

Joined: Sep 05, 2002
Posts: 98
I m puzzled. Sorry, for my lack of knowledge. How can FORM (case 3) be a BASIC type also?


SCJP 2(94%), SCBCD 5.0(86%), SCDJWS(86%), SCEA 5 (I-73%, II/III-88%)
The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn, and relearn. - Alvin Toffler
See El
Ranch Hand

Joined: Oct 07, 2002
Posts: 44
1,2,3 follows the DTD for login-config :
<!ELEMENT login-config (auth-method?, realm-name?, form-login-config?)>
so it's perfectly fine.
In 3, realm-name is not needed though, so it's just being ignored.


See El<br />SCJP2, SCWCD, IBM XML, SCBCD
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: mock test question
 
Similar Threads
Sample web.xml.. may be useful for SCWCD Ranchers
login-config question
Question about login-config
DD entries for authentication
SCWCD mock questions II