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 8191077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:50:13+00:00 2026-06-07T03:50:13+00:00

I have recently started learning spring security and trying to incorporate it into my

  • 0

I have recently started learning spring security and trying to incorporate it into my existing web application. The app is simple in configuration so I’m confused where I’ve managed to screw it up.

My web.xml

<!-- FilterChain proxy for 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>

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/appname-servlet.xml</param-value>
</context-param>


<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener> 

<servlet>
    <servlet-name>nistreq</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/appname-servlet.xml</param-value>
    </init-param>
</servlet>

<servlet-mapping>
    <servlet-name>appname</servlet-name>
    <url-pattern>/</url-pattern>
</servlet-mapping>

<welcome-file-list>
    <welcome-file>mainpage.jsp</welcome-file>
</welcome-file-list>

and the security-config.xml

<security:http access-denied-page="/denied.jsp" use-expressions="true">
    <security:form-login login-page="/login.jsp"
        authentication-failure-url="/login.jsp?login_error=true" />     
    <security:intercept-url pattern="/*" access="isAuthenticated()"/>
    <security:logout/>
</security:http>

There looks to be some bad mojo between my URIs I’ve mapped for the springSecurityFilterChain (“/“), the servlet mapping’s URL pattern (“/”), and the security:intercept-url pattern (“/“). This causes a redirect loop. I’ve gone through countless variations of moving terms around, pushing content into sub-packages to avoid protecting the application root, etc. I always end up with a grab bag of a 404, a redirect loop, etc.

I’m doing something really boneheaded here and would appreciate another set of eyes. Thanks for any insights…

  • 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-07T03:50:14+00:00Added an answer on June 7, 2026 at 3:50 am

    I believe you just need to add an exception for you login page. In addition to what you have in your security-config.xml add the following:

    <security:http pattern="/login.jsp" security="none" />
    

    Whatever URL you try to go to, it’s not authenticated, so it tries to go to the login page. However, that is also not authenticated, so and so it just spins and spins. Your login page needs to be accessible without being authenticated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have only started learning Python recently. Let me explain what I am trying
I have recently started learning wpf and am trying to use mvvm. My understanding
I've been a web developer for some time now, and have recently started learning
I have recently started learning java as my first ever step into object oriented
I've recently started learning/using django; I'm trying to figure out a way to have
I have recently started learning CUDA and I've integrated my CUDA into MS Visual
I have recently started learning c# and have come across an issue. I'm not
Recently I have started learning rails and was a little surprised that the default
I have only started learning python recently. I would still be considered a beginner.
I have recently started to use Twitter Bootstrap and trying to understand how it

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.