wood burning stoves 2.0*
The moose likes Servlets and the fly likes Deployment Descriptor web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Deployment Descriptor web.xml" Watch "Deployment Descriptor web.xml" New topic
Author

Deployment Descriptor web.xml

Shailaja Tankala
Greenhorn

Joined: Jan 31, 2005
Posts: 5
Hi

I have two filters to process a servletrequest called as FirstFilter and SecondFilter.
The request should pass through FirstFilter and than SecondFilter before it can be processed by the encompassing component.
How can I specify that the request should pass through FirstFilter and than SecondFilter in the deployment descriptor file web.xml.


Thanks In advance
Sharmila
Daniel Rhoades
Ranch Hand

Joined: Jun 30, 2004
Posts: 186
Here you go:

<filter>
<filter-name>FirstFilter</filter-name>
<filter-class>filters.FirstFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>FirstFilter</filter-name>
<servlet-name>someservlet</servlet-name>
</filter-mapping>

<filter>
<filter-name>SecondFilter</filter-name>
<filter-class>filters.SecondFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>SecondFilter</filter-name>
<servlet-name>someservlet</servlet-name>
</filter-mapping>

The order in which your filters are used is the same as the order in the DD


Drinking more tea is the key...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deployment Descriptor web.xml