Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how use * in servlet mapping ?

 
amir taghvayi
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
my folders in my projects is :


i want a run a filter before as manager.jsp . the my web.xml setting is :

but the my filter not runed .

please help me !!!
 
Stefan Evans
Bartender
Pie
Posts: 1670
10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can not write such a filter mapping. The specification does not allow the use of a * in the middle of an expression.

My suggestion would be set it up to match as far as the * in the filter mapping, and then have the filter explicitly check for the remainder


And then in the filter...

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My suggestions would be to ditch those URLs completely, and come up with more RESTful URLs that end with the variable part.
 
chandu gattu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use as <url-pattern>/component/*</url-pattern> . It will work perfectly
 
amir taghvayi
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks all . i use your suggestions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic