It's not a secret anymore!*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HFJS (V2) Final Mock Question 11 is wrong? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HFJS (V2) Final Mock Question 11 is wrong? " Watch "HFJS (V2) Final Mock Question 11 is wrong? " New topic
Author

HFJS (V2) Final Mock Question 11 is wrong?

Kay Li
Greenhorn

Joined: May 11, 2009
Posts: 14
Given these fragments from within a single tag in a Java EE DD:
343. <web-resource-collection>
344. <web-resource-name>Recipes</web-resource-name>
345. <url-pattern>/Beer/Update/*</url-pattern>
346. <http-method>POST</http-method>
347. </web-resource-collection>
...
367. <auth-constraint>
368. <role-name>Member</role-name>
369. </auth-constraint>
...
385. <user-data-constraint>
386. <transport-guarantee>CONFIDENTIAL</transport-guarantee>
387. </user-data-constraint>
Which are true? (Choose all that apply.)

A. A Java EE DD can contain a single tag in which all of these tags can legally co-exist.
B. It is valid for more instances of <auth-constraint> to exist within the single tag described above.
C. It is valid for more instances of <user-data-constraint>
to exist within the single tag described above.
D. It is valid for more instances of <url-pattern> to exist within the <web-resource-collection> tag described above.
E. It is valid for other tags of the same type as the single encasing tag described above to have the same <url-pattern> as the tag above.
F. This tag implies that authorization, authentication, and data integrity security features are all declared for the web application.

Book's answer: ABDEF

I think that it should be: ADEF

It is valid for 0 or 1 instances of <auth-constraint> to exist within the single tag described above.

Chinmaya Chowdary
Ranch Hand

Joined: Apr 21, 2008
Posts: 432
Hi Kay. Here option B also correct. We can have more than one <auth-constraint> tags in <security-constraint>.

or we can declare like

Kay Li
Greenhorn

Joined: May 11, 2009
Posts: 14
According to Java™ Servlet Specification
Version 2.4 :

<xsd:element name="auth-constraint"
type="j2ee:auth-constraintType"
minOccurs="0"/>
<xsd:element name="user-data-constraint"
type="j2ee:user-data-constraintType"
minOccurs="0"/>

<auth-constraint> can only be 0,1 instance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HFJS (V2) Final Mock Question 11 is wrong?
 
Similar Threads
JBOSS web logon not redirecting from port 8080 to 8443 at login
Securing my web application on JBoss 5.1.0.GA
Question 11 of HFSJ Final mocktest
<login-config> in DD
HFSJ 2nd edition Mock exam questions 6, 11,26,34,49 and 69