• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to configure multiple *.do in web.xml file

 
Ashit Acharya
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my project,I want to configure multiple filters for different purpose.

1.)For everey request I want to configure a filter for CSRF implementation.
2.)For every request I want to configure filter for Audit monitoring.

So in both the cases I need to configure *.do in my web.xml.So where I need to set something so that in every case both the filters can work.

can anybody suggest me on this?



Thanks in advance......


 
Marcos R Oliveira
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, Ashit,

You need to configure your filters in your applicationĀ“s web.xml, as you said.

And here you can find how to do it: The Essentials of Filters

Regards,
Marcos.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2164
57
Android Chrome Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So in both the cases I need to configure *.do in my web.xml.So where I need to set something so that in every case both the filters can work.

You can solve this in two ways:

1) If you have a <servlet> with a <servlet-mapping> in your web.xml with a *.do in the <url-pattern> you can attach the two filters to a <servlet-name> in the <filter-mapping> element
or
2) You can attach the two filters to a <url-pattern> (*.do) in the <filter-mapping> element

Regards,
Frits


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic