aspose file tools*
The moose likes Servlets and the fly likes how use * in servlet mapping ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how use * in servlet mapping ? " Watch "how use * in servlet mapping ? " New topic
Author

how use * in servlet mapping ?

amir taghvayi
Ranch Hand

Joined: Sep 16, 2011
Posts: 54
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

Joined: Jul 06, 2005
Posts: 1018
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

Joined: Jan 10, 2002
Posts: 61424
    
  67

My suggestions would be to ditch those URLs completely, and come up with more RESTful URLs that end with the variable part.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
chandu gattu
Greenhorn

Joined: Nov 02, 2011
Posts: 3
you can use as <url-pattern>/component/*</url-pattern> . It will work perfectly
amir taghvayi
Ranch Hand

Joined: Sep 16, 2011
Posts: 54
thanks all . i use your suggestions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how use * in servlet mapping ?