File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFJS (V2) Final Mock Question 11 is wrong?

 
Kay Li
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 432
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic