aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes How to configure multiple *.do in web.xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "How to configure multiple *.do in web.xml file" Watch "How to configure multiple *.do in web.xml file" New topic
Author

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

Ashit Acharya
Greenhorn

Joined: Apr 18, 2010
Posts: 6
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

Joined: Apr 20, 2002
Posts: 51
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.


SCJP 1.4 - SCJP 1.6 - SCWCD in progress
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1678
    
  25

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


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to configure multiple *.do in web.xml file