Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8987363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:46:19+00:00 2026-06-15T21:46:19+00:00

I was following this tutorial: http://www.mkyong.com/spring-security/spring-security-hello-world-example/ In the spring-security-xml <http auto-config=true> <intercept-url pattern=/welcome* access=ROLE_USER

  • 0

I was following this tutorial:
http://www.mkyong.com/spring-security/spring-security-hello-world-example/

In the spring-security-xml

<http auto-config="true">
    <intercept-url pattern="/welcome*" access="ROLE_USER" />
</http>

And in the web.xml, we must define the actual filter

<!-- Spring Security -->
<filter>
    <filter-name>springSecurityFilterChain</filter-name>
    <filter-class>
              org.springframework.web.filter.DelegatingFilterProxy
            </filter-class>
</filter>

<filter-mapping>
    <filter-name>springSecurityFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

So I don’t get this, we are mapping the interception to 2 urls in 2 places. To /welcome* and /*. Why we need both of these? Am I missing something here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:46:21+00:00Added an answer on June 15, 2026 at 9:46 pm

    DelegatingFilterProxy is not a Spring Security class. It is from Spring Web package.

    Proxy for a standard Servlet 2.3 Filter, delegating to a
    Spring-managed bean that implements the Filter interface. Supports a
    “targetBeanName” filter init-param in web.xml, specifying the name
    of the target bean in the Spring application context.

    When you use

    <http auto-config="true">
    
    </http>
    

    Spring Security creates (implicitly) bean with name springSecurityFilterChain (that’s why you have <filter-name>springSecurityFilterChain</filter-name> in your web.xml) and all requests (/*) are processed by it (by Spring Security).

    Then you configure Spring Security and give it more specific URL (/*welcome).

    <intercept-url pattern="/welcome*" access="ROLE_USER" />
    

    It’s like saying:

    • All URL requests (/*) should be investigated by Spring Security
    • When URL matches /welcome* principal should have ROLE_USER role.

    If your application requires more advanced security processing you can create that filter chain bean by yourself and configure all filters manually.

    Example:

    <!-- Filter Chain -->
    <bean id="springSecurityFilterChain"
          class="org.springframework.security.web.FilterChainProxy">
        <constructor-arg>
            <list>
                <sec:filter-chain pattern="/favicon.ico"
                                  filters="none"/>
    
                <sec:filter-chain pattern="/img/**"
                                  filters="none"/>
    
                <sec:filter-chain pattern="/**" 
                     filters="bannedIPsFilter, <!-- custom filter -->
                             channelProcessingFilter,
                             securityContextPersistenceFilter,
                             concurrentSessionFilter,
                             logoutFilter,
                             secondAuthenticationFilter, <!-- custom filter -->
                             openIDAuthenticationFilter,
                             usernamePasswordAuthenticationFilter,
                             anonymousAuthenticationFilter,
                             captchaFilter, <!-- custom filter -->
                             sessionManagementFilter,
                             exceptionTranslationFilter,
                             filterSecurityInterceptor,
                             switchUserProcessingFilter"
                        />
            </list>
        </constructor-arg>
    </bean>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am following this tutorial to setup spring in my system, http://www.roseindia.net/spring/spring-mvc-hello-world.shtml . Here
I am following this tutorial online to the letter. http://www.tutorialspoint.com/spring/spring_bean_life_cycle.htm But I get the
I have set up MongoDB following this tutorial http://www.littlelostmanuals.com/2011/09/spring-mongodb-type-safe-queries.html Everything works as expected but
I was following this tutorial: http://www.vogella.com/articles/AndroidLocationAPI/article.html --> Paragraph 6.0 Problem: My emulator runs perfectly
I'm following this tutorial http://www.vogella.com/articles/AndroidIntent/article.html for having some data transfered to parent activity by
I am following this tutorial http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/ note: yes I know I did install hadoop
i have made a simple php contact form following this tutorial: http://www.catswhocode.com/blog/how-to-create-a-built-in-contact-form-for-your-wordpress-theme The big
I'm following this tutorial for twitter4j: http://www.javacodegeeks.com/2011/10/java-twitter-client-with-twitter4j.html and I've gotten almost everything right. All
http://www.codinghorror.com/blog/2008/04/setting-up-subversion-on-windows.html I am following this as a guide to install subversion. The tutorial at
I've tried following this tutorial (http://www.raywenderlich.com/4666/how-to-create-a-hud-layer-with-cocos2d) however as you can probably tell I'm not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.