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

  • SEARCH
  • Home
  • 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 8026179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:24:20+00:00 2026-06-04T23:24:20+00:00

I am using the spring security for the authentication of my web application. I

  • 0

I am using the spring security for the authentication of my web application. I could successfully use it by configuring as follows:

<http auto-config='true'>
    <intercept-url pattern="/Login" filters="none" access="ROLE_USER"/>
    <form-login login-page='/Login' authentication-failure-url="/Login/Failure" 
        default-target-url="/Url"/>
</http>

<authentication-manager>
    <authentication-provider>
        <user-service>
           <user name="admin" password="admin" authorities="ROLE_USER" />
        </user-service>
    </authentication-provider>
</authentication-manager>

The above code working fine for if I directly login from the login page. If one of the user is accessing the different url which is not the login page. Now I want to restrict the user to access any direct url without login to the system first time.

How can i do that?

  • 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-04T23:24:22+00:00Added an answer on June 4, 2026 at 11:24 pm

    You need to change the intercept rule to:

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

    You might also have to exlude the login page from the auth requirement. Because a user does not have to login in order to see the login page. You can do that by adding:

    <intercept-url pattern="/Login" filters="none"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been looking into using Spring Security for the authentication/authorization of my web application
I have a j2ee web application using spring web flow ang spring security. I
I am using spring security 3.0.5 in my web application based on Spring MVC.
I'm using spring-security web authentication with spring-mvc, all is well so far, but now
I done my MVC web application using spring security 2.0.4 and spring 2.5 and
I am trying to use Spring Security 3.0.5 in my web application. Basically, I
My web application is using Spring Security but it returning a BadCredentialsException when processing
I'm developing a Grails (Version 1.3.3) Web-Application using the Grails Spring-Security Plugin, Spring-Security-Core-1.0.1 (which,
I'm using spring MVC, and I have a custom authentication/security system that I had
I am using Spring Security 3.0.6. for modularity reasons, I would like to use

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.