This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Spring and the fly likes Filter configuration in spring security Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Filter configuration in spring security" Watch "Filter configuration in spring security" New topic
Author

Filter configuration in spring security

kuldeep sidhu
Greenhorn

Joined: Jan 07, 2014
Posts: 15
I am using spring-security for basic login for my application and various levels of access..
In web.xml i have configured the filter as follows



My doubts are as follows-
1. In the above snippet is it necessary to define filter before filtermapping tag? I try reversing the order i was getting some exception filter not found etc..How web.xml is parsed?
2. In url-pattern what is the difference between /, /* and /**.
I tried /** but it was not working. /* is working perfectly.
Surendra Kumar
Ranch Hand

Joined: Jul 04, 2006
Posts: 235
1. Yes. web.xml follows a schema that has to be followed while writing the file (check your web.xml to see xsd location).
2. Yes, /** is not a valid url pattern. /*, /*.do, /admin/* etc. are some valid patterns.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Filter configuration in spring security
 
Similar Threads
Got Problems with Tuckey UrlRewriteFilter and Spring 3 Web MVC
Struts 2+Tiles+Spring Core+Spring Security
Spring Security Not intercepting the request
Struts2 integration with Spring Security