• 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

Configuration for both protected and public URLs in a web application

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,


I am trying to configure web.xml to have both protected and public URLs but still the app
authenticates the public URLs. Protected URLs works fine. I would greatly appreciate if you can
help to configure the whole application has protected except for few URLs which should be public
and without authentication. I could have added each URL for protected but there are plenty hence
using /* for protected.

protected URLs
-----------------
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>AUTHENTICATED_USERS</role-name>
</auth-constraint>
</security-constraint>

public URLs
-------------
<security-constraint>
<web-resource-collection>
<web-resource-name>Unprotected</web-resource-name>
<url-pattern>/public/welcome.html</url-pattern>
</web-resource-collection>
</security-constraint>


Thanks in advance.


Thanks
Yogesh
 
If you like strawberry rhubarb pie, try blueberry rhubarb (bluebarb) pie. And try this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic