learn java
The moose likes Spring and the fly likes authentication in spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "authentication in spring" Watch "authentication in spring" New topic

authentication in spring

Shivaprakash Shettihalli

Joined: Nov 20, 2007
Posts: 18
I'm developing an application. I want to implement authentication for the application. I am tring to intercept all the URLs. I tried the same with <intercept-url pattern="/**" access="ROLE_USER" />.
when i did that none of the URLs are getting redirected to the login page.
My requirement is to intercept all the URLs. Please help me out to achieve the same.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17260

Well, my first guess is with that setting, you just secured your login page. So you have to login to see the login page, but you can't because you have to login first to login to login to login to login.

Make sure you do something like

<intercept-url pattern="login url here" filters="none"/>

or if you are using the latest Spring Security you can do similar with the <http> tag


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Have you tried LearnNowOnline? http://www.learnnowonline.com/
subject: authentication in spring