• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JWebplus : Question ID :996506417068

 
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following xml fragments correctly define a security constraint in web.xml?
1.
<security-constraint>
<web-resource-collection>
<web-resource-name>Info</web-resource-name>
<url-pattern>/info/*</url-pattern>
<http-method>GET</http-method>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
2.
<security-constraint>
<web-resource-collection>
<web-resource-name>Info</web-resource-name>
<url-pattern>/info/*</url-pattern>
<http-method>GET</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>manager</role-name>
</auth-constraint>
</security-constraint>
3.
<security-constraint>
<web-resource>
<web-resource-name>Info</web-resource-name>
<url-pattern>/info/*</url-pattern>
<http-method>GET</http-method>
</web-resource>
<auth-constraint>
<role-name>manager</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>

4.
<security-constraint>
<web-resource-collection>
<web-resource-name>Info</web-resource-name>
<url-pattern>/info/*</url-pattern>
<http-method>GET</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>manager</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
5.
<security-constraint>
<web-resource-collection>
<web-resource-name>Info</web-resource-name>
<url-pattern>/info/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>manager</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
Why only 4 and 5 is correct ? Why not 1, 2 also ...as <web-resource-collection>
is the only must requirement element...?
 
Enthuware Software Support
Posts: 4453
41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It does show all the four as correct. It looks like you have a very old version. To upgrade it for free, please open a ticket at www.enthuware.com/support and specify your order id.
HTH,
Paul.
 
    Bookmark Topic Watch Topic
  • New Topic