• 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

servlet mapping question

 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where are wildcards allowed?

When specifying a servlet mapping, what wildcards are allowed. I know you can do "*.html" and "/root/*". Is something like "a-*" allowed?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here are the exact rules from the spec:


SRV.11.2 Specification of Mappings

In theWeb application deployment descriptor, the following syntax is used to define
mappings:

� A string beginning with a �/� character and ending with a �/*� suffix is used
for path mapping.

� A string beginning with a �*.� prefix is used as an extension mapping.

� A string containing only the �/� character indicates the "default" servlet of
the application. In this case the servlet path is the request URI minus the context
path and the path info is null.

� All other strings are used for exact matches only.



so... no.
[ March 27, 2008: Message edited by: Ben Souther ]
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Got it. Thanks Ben.
 
reply
    Bookmark Topic Watch Topic
  • New Topic