Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

url pattern in servlet filter

 
muthu bharathi
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

How to give the url pattern in filters in web.xml

My web.xml is like the following

<filter>
<filter-name>TokenGuard</filter-name>
<filter-class>com.app.core.token.TokenGuard</filter-class>
</filter>
<filter-mapping>
<filter-name>TokenGuard</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>

but it doesn't work... may i know the above url-pattern is correct or wrong...
or
how can we declare a filter to operate on more than one url pattern

if i give the url pattern like like <url-pattern>*.jsp</url-pattern> it works fine....

please help meeeee..


--
With Regards,
M. Bharathi

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a servlet/JEE issue, not Struts.
 
muthu bharathi
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

if i give the url-pattern like the following.... the code works fine

<filter-mapping>
<filter-name>TokenGuard</filter-name>
<url-pattern>/RetailBank/*</url-pattern>
</filter-mapping>

if i give the url-pattern like the following.... the code doesnt work

<filter-mapping>
<filter-name>TokenGuard</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>

But i wants to know reason or what is the equivalent of *.do with specific reason.

Please clear me as soon as possible

Advance Thanks

--
With Regards,
M. Bharathi
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe you've misunderstood me--this isn't a Struts question, it's a servlet/JEE question.

Filter mapping doesn't really have anything to do with Struts.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic