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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:03:37+00:00 2026-05-29T21:03:37+00:00

Is there a complete example where always-use-default-target is used in Spring Security? Especially I

  • 0

Is there a complete example where always-use-default-target is used in Spring Security? Especially I had asked the following question at the following link
“Does it mean that for any page requested the spring security will start checking if the user has logged in? If not then if you mean to say that only when /secure/kittens.html is requested, the spring will try to check if the user is logged in, i would like to know where or how this check is made? The reason i am asking is i just tested but it did not work, i would like to know if i have to write some redirect logic in /secure/kittens.html?

Spring MVC and login redirect

  • 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-05-29T21:03:39+00:00Added an answer on May 29, 2026 at 9:03 pm

    Spring will use a filter to make the security check based on your configuration. In your spring-security configuration you will need to setup an entry for /secure/kittens.html (or more generally /secure ) to tell spring-security that the user must be authenticated, or must have a given role in order to view the page. Once that is configured the filter will check against your rules, in order, to see if the user has permission to view the page. If not, spring-security will send them to the configured login page.

    Have a look at the configuration of spring-security, specifically the intercept-url configuration for examples of configuring spring-security for your url space. That configuration page also has an example of configuring always-use-default-target. Again, note that the rules are evaluated in order, so a general case check at the top of the list will be matched before a specific one at the bottom, so make sure your rules are in order, specific to general.

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

Sidebar

Related Questions

Are there complete MVVM example solutions that don't use a 3rd party frameworks, Silverlight,
Is there a simple complete code example using any gui toolkit (that will work
Is there a complete list of Google Gears enabled sites? I'm aware of rememberthemilk.com,
Is there a complete list of the objects you can tap into with <%$
Is there a way to auto complete a statement in eclipse? If I type
Is there a way to turn off auto-complete on an input-field using jQuery? Like
Is there a way to implement auto-complete functionality in a region defined by textarea
Is there such a thing as an on load complete for images in iphone?
Even though I always strive for complete validation these days, I often wonder if
I'm trying to figure out how to have Spring Security return a UserDetails object

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.