A
Aquila Deus
1.How to set the order of filters? Any method other than the order of
<filter-mapping> in web.xml?
2.Since filters can also modify the response, why use "servlet"? Why
not simply use all-filters and let the last filter to output contents?
I think this is more flexible because you may also need to "filter"
things (such as debug info) after the page output.
3.Why not send to all requests to one servlet and let it decide who and
how to filter and output the contents? I do this all of time in php
(all links point to /index.php?page=XXX...)
<filter-mapping> in web.xml?
2.Since filters can also modify the response, why use "servlet"? Why
not simply use all-filters and let the last filter to output contents?
I think this is more flexible because you may also need to "filter"
things (such as debug info) after the page output.
3.Why not send to all requests to one servlet and let it decide who and
how to filter and output the contents? I do this all of time in php
(all links point to /index.php?page=XXX...)