• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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

 
Greenhorn
Posts: 6
  • 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......


 
Ranch Hand
Posts: 62
1
  • 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.
 
Creator of Enthuware JWS+ V6
Posts: 3346
303
Android Eclipse IDE Chrome
  • 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


 
Arthur, where are your pants? Check under this tiny ad.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic