In the application there are 5 filters that get applied. Originally there was only one url pattern that we were applying the filters to, but now we are putting in friendly urls (it's a tapestry application) and for every friendly url we are having to copy every filter declaration.
So while we started with 5 declarations (one per filter) there are now 15 (as there are now 3 url patterns).
The only other option is to use /* as the pattern but I have read that this could lead to complications with malformed url's.
Do you have any link to documentation that shows that it can't be done? I can see from the many, *many* examples that it doesn't look possible, but I always like to see documentation so that I can understand why.
Thank you for your reply, Kind regards, Rachel
Joined: May 18, 2004
Just for anyone else following, I found in the servlet 2.5 spec the following:
Previous versions of the servlet schema allows only a single url-pattern in a filter mapping. For filters mapped to multiple URLs this results in needless repetition of whole mapping clauses.
So I assume that means in the 2.3 that I'm using that I need to declare only one pattern per filter per declaration.
Can you post your <web-app> element? I want to double check the attribute xsi:schemaLocation. I upgrade my servlet specification from 2.3 to 2.5 and my IDE (MyEclipse) complains about the schema. However, I change these atributtes and is working fine on my app server and on MyEclipse:
Allready 2011? Ahhh time flies when you're having fun...
Anyway, I just googled on the same issue: multiple occurrences of the <url-pattern> inside <filter-mapping>
Just curious about it, I did some trying and my Eclipse-Beer-application accepted it without hesitation.
Just wondering (without specifying any version-numbers etcetera..) is it still likely to be very vendor-specific?
Or is it nowadays part of in the official specs?
I know, this time I didn't much research myself, tomorrow is my exam-day, so for now I prefer to do some
freewheeling through the exam-stuff.