| Author |
Filter Sequence issue
|
BO KANG
Greenhorn
Joined: Jun 19, 2008
Posts: 9
|
|
Hey ranchers: One question about Filter mapping sequence : Given these filter mapping declarations: <filter-mapping> <filter-name>FilterOne</filter-name> <url-pattern>/admin/*</url-pattern> <dispatcher>FORWARD</dispatcher> </filter-mapping> <filter-mapping> <filter-name>FilterTwo</filter-name> <url-pattern>/users/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>FilterThree</filter-name> <url-pattern>/admin/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>FilterTwo</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> in what order are the filters invoked for the following browser request? /admin/index.jsp a FilterOne, FilterThree b FilterOne, FilterTwo, FilterThree c FilterThree, FilterTwo d FilterThree, FilterTwo e FilterThree f None of these filters are invoked. The answer is d,but i think it should be FilterOne FilterThree FilterTwo? Thanks
|
 |
Amit Prakash Singh
Ranch Hand
Joined: May 11, 2006
Posts: 38
|
|
|
Answer d is correct as the filter one has <dispatcher> element with value forward. Which will act only when the request has been forwarded to this url-pattern.
|
Amit Prakash Singh<br /> <br />SCJP 1.4 93% <br />SCWCD1.5 85%
|
 |
BO KANG
Greenhorn
Joined: Jun 19, 2008
Posts: 9
|
|
|
Yes yes ,thanks
|
 |
 |
|
|
subject: Filter Sequence issue
|
|
|