InterviewSolution
| 1. |
In Which Order Do You Have To Write Multiple Intercept-url’s? |
|
Answer» When matching the specified patterns defined by element intercept-url against an INCOMING request, the matching is done in the order in which the elements are declared. So the most specific patterns should COME first and the most GENERAL should come last. <intercept-url pattern='/secure/a/**' access='ROLE_A'/> <intercept-url pattern='/secure/b/**' access='ROLE_B'/> <intercept-url pattern='/secure/**' access='ROLE_USER'/> When matching the specified patterns defined by element intercept-url against an incoming request, the matching is done in the order in which the elements are declared. So the most specific patterns should come first and the most general should come last. <intercept-url pattern='/secure/a/**' access='ROLE_A'/> <intercept-url pattern='/secure/b/**' access='ROLE_B'/> <intercept-url pattern='/secure/**' access='ROLE_USER'/> |
|