Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJWCD
Search Coderanch
Advance search
Google search
Register / Login
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
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Ron McLeod
paul wheaton
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Himai Minh
Bartenders:
Forum:
Web Component Certification (OCEJWCD)
The DD security-role element in web.xml
sridhar row
Ranch Hand
Posts: 162
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Can someone please let me know if the <security-role> element goes under a <
servlet
> element or is it a separate element under <web-app....>??
Baddy Davay
Greenhorn
Posts: 26
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
<web-app>
<servlet >
<security-role-ref>
....
</security-role-ref>
</servlet>
<security-role>
</security-role>
<web-app>
sridhar row
Ranch Hand
Posts: 162
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Authentication works without <security-role> element in web.xml. So I'm wondering what is the use of it?? code that works:
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="member"/> <role rolename="admin"/> <role rolename="guest"/> <user username="tomcat" password="pindy" roles="guest"/> <user username="pussycat" password="gandy" roles="admin"/> <user username="anthony" password="12345678" roles="admin,member"/> </tomcat-users>
<login-config> <auth-method>BASIC</auth-method> </login-config> <security-constraint> <web-resource-collection> <web-resource-name>loginTesting</web-resource-name> <url-pattern>/*</url-pattern> <http-method>GET</http-method> <http-method>POST</http-method> </web-resource-collection> <auth-constraint> <role-name>member</role-name> <role-name>admin</role-name> </auth-constraint> </security-constraint>
localhost/Beer-v1/login.html
[ December 30, 2008: Message edited by: Warnakulasuriya Patabendige Ushanth ]
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
<security-role-ref> comes under which tag??
security-role-ref element
About security-role-ref & security-role DD elements
Ch 7 in More Servlets...Form Based Authentication
Contradiction in servlet spec
More...