• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

declarative authorization not working

 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

This is my web.xml:


<web-app>

<security-constraint>

<web-resource-collection>

<web-resource-name>anything</web-resource-name>

<url-pattern>/aa/restrict.jsp</url-pattern>

<http-method>GET</http-method>
<http-method>POST</http-method>

</web-resource-collection>

<auth-constraint>

</auth-constraint>

</security-constraint>

<security-role>
<role-name>tomcat</role-name>
<role-name>role1</role-name>
<role-name>admin</role-name>
</security-role>

</web-app>



Where these three roles are present in my tomcat-users.xml. No other role is there in tomcat-users.xml.

And I have a JSP restrict.jsp on root. When I access this JSP directly I shouldn't be allowed. As no <role-name> is present in <auth-constraint> means no role is allowed. But I can access this JSP. Why so?

Thanks.
[ June 02, 2007: Message edited by: ankur rathi ]
 
Yeast devil! Back to the oven that baked you! And take this tiny ad too:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic