Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

servlet mapping question  RSS feed

 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37222
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
Sheriff
Posts: 37222
519
Eclipse IDE Java VI Editor
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!