Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Programmatic Security

 
Nikhil Jain
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pg 643, HFS

Is'nt theres something wrong in the below declaration

<web-app>
<servlet>
<security-role-ref>
<role-name>Manager</role-name>
<role-link>Admin</role-link>
</security-role-ref>
...
</servlet>
</web-app>

<web-app>
<security-role>
<role-name>Admin</role-name>
</security-role>
...
</web-app>

There are 2 web-apps, I thought there could be only one <web-app> tag in a dd, but in the above declartion there are two tags.
 
Cai DongShan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, there is only one <web-app> tag in a dd. Refer to Servlet 2.4 spec
The web-app element is the root deployment descriptor for a Web application.
 
Gaurav Gambhir
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes , this would all come in single web.xml file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic