Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSP
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
Paul Clapham
Ron McLeod
Jeanne Boyarsky
Tim Cooke
Sheriffs:
Liutauras Vilda
paul wheaton
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Carey Brown
Frits Walraven
Bartenders:
Piet Souris
Himai Minh
Forum:
JSP
need help in security-constraint
Arul Jose
Ranch Hand
Posts: 131
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This is my web.xml content
<security-role> <role-name>admin</role-name> <role-name>user</role-name> <role-name>guest</role-name> </security-role> <login-config> <auth-method>BASIC</auth-method> </login-config> <security-constraint> <web-resource-collection> <web-resource-name>examples</web-resource-name> <url-pattern>/ex/security/s1.jsp</url-pattern> <http-method>GET</http-method> <http-method>POST</http-method> </web-resource-collection> <auth-constraint> <role-name>admin</role-name> </auth-constraint> </security-constraint> <security-constraint> <web-resource-collection> <web-resource-name>examples</web-resource-name> <url-pattern>/ex/security/s2.jsp</url-pattern> <http-method>GET</http-method> <http-method>POST</http-method> </web-resource-collection> <auth-constraint> <role-name>admin</role-name> <role-name>user</role-name> </auth-constraint> </security-constraint>
This is my conf/tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="user"/> <role rolename="tomcat"/> <role rolename="role1"/> <role rolename="admin"/> <role rolename="guest"/> <user username="user" password="user" roles="user"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1" password="tomcat" roles="role1"/> <user username="arul" password="jose" roles="guest,user,admin"/> <user username="guest" password="guest" roles="guest"/> </tomcat-users>
my book says i will get a login screen when i try to access the resource. but i could see no login screen. i dont know why.
the resources(s1.jsp,s2.jsp) are still freely accessible.
ARUL JOSE
[ August 08, 2005: Message edited by: Bear Bibeault ]
F is for finger. Can you stick your finger in your nose? Doesn't that feel nice? Now try this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Problem While Enabling Authentication
Redirect to the requested page failed using form-based authentication
Basic Authentication Does Not Work Properly
security constraint - not working
web security not working as expected,
More...