controlling execution order of servlet filters

A

Angus Parvis

Hi,

I am developing a web-application using Tomcat 5. Most of the user's
requests invoke servlet filters before the request is passed to the
servlet itself.

What I want to do is to chain up several filters. For example when the
users requests /MyServlet the filter-chain should be like this:

LocalizationFilter -> AuthenticationFilter -> /MyServlet

MyServlet generates specialized XML data. On the "way back" I want to
add some general XML data (PageGenerationFilter) and then transform the
whole document (XSLTFilter). The servlet and it's filters should be
chained like this:

/MyServlet -> PageGenerationFilter -> XSLTFilter

What I want is to control the order of the filters to be invoked - to
asure, that the XML data is complete before the transformer is invoked.

The simplest quick'n'dirty solution to this problem would be to unite
the PageGenerationFilter with the XSLTFilter - but I think there has to
be a way to control the invocation order of servlet filters. Can you
tell me how to do this?

Please don't direct me to docs or tutorials unless they are really
helpful. I spent quite a while searching the internet, but couldn't find
useful information.

Thanks for every help,

Greetings,

Angus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top