• 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

url-pattern in web-resource-collection

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

in the Specs of Servlets: <url-pattern>*, which means that it is optional (0 to many).
what happens if you omit the <url-pattern> inside <web-resource-collection>?
[ April 29, 2008: Message edited by: Musab Al-Rawi ]
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
url-pattern for web-resource-collection is required. See page 133 of the Servlet 1.4 spec. If it were optional it would specify minOccurs="0" for the url-pattern element.
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if <url-pattern> is missed in <web-resource-collection> then the server ignores <web-resource-collection> element, because there is no meaning to <web-resource-collection> element if we dont use <url-pattern> in it.

Generally it will be <url-pattern>*</url-pattern>, so that anyone can access any URL, that means all users can access the all parts of the application.

in the blow case:
<url-pattern>/security/xyz.jsp</url-pattern>, if you specify perticular user, then he alone can access this url.
[ April 29, 2008: Message edited by: Kumar Garlapati ]
 
Musab Al-Rawi
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.

Kumar:

Generally it will be <url-pattern>*</url-pattern>, so that anyone can access any URL, that means all users can access the all parts of the application.



I think you meant to say that all resources are restricted (for the specified methods and roles) unless a user (that belongs to the specified role(s)) is loggedin. Am I correct?
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah I think you are right...All the resources get restricted.....And if you want specific resources to be restricted and rest everything to be accessed then you should be writing /jsp/* ..just an example...which will restrict all the jsp pages..but the images, css and all such other resources will still be accessible....
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic