Announcement Announcement Module
Collapse
No announcement yet.
Function of filter Attribute in http Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Function of filter Attribute in http

    I am not able to figure this that what is the actual purpose of filters attribute in
    <intercept-url pattern="..." filters="...." access="ROLE_..."/>
    element if anybody can clear this to me i will be gratful for the favor.

    Regards

  • #2
    From the schema:

    "The filter list for the path. Currently can be set to 'none' to remove a path from having any filters applied. The full filter stack (consisting of all defined filters, will be applied to any other paths)."

    Comment


    • #3
      Right. 'none' is very handy if you send, say, /* to the springSecurityFilterChain from the web.xml but don't want certain subcategories of URLs to be processed. For instance, I am working on a corporate "template" project where actual projects may or may not use J2EE security. In the case the project does use J2EE security, I want various offline configurations to map to the non-j2ee versions for convenience. So the non-j2ee configuration doesn't have any filters="none" entries but the J2EE version has an <intercept:url pattern="/j_security_check" filters="none"> attribute (because I want the container to process the authentication in this case).

      Comment


      • #4
        does this mean that i can define customize filters in my web.xml file and assigne that filter here???? will it work as i said or is it suppose to have Spring Provided Filters

        Comment


        • #5
          You can do it either way, or both. It just depends on what you are trying to do. Standard URL syntax for the web.xml is a bit less flexible than Apache Ant-style syntax, so I generally prefer to exclude from the springSecurityFilterChain. Also I don't know of any way to specify a url-mapping in a web.xml as an "exclude" URL.

          Comment


          • #6
            Originally posted by muhammad_sibtain View Post
            does this mean that i can define customize filters in my web.xml file and assigne that filter here???? will it work as i said or is it suppose to have Spring Provided Filters
            No, it's referring to the filters created by the Spring namespace configuration or added into the stack using the <custom-filter> element.

            Comment

            Working...
            X