aspose file tools*
The moose likes Spring and the fly likes A better way to display a login failure message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "A better way to display a login failure message" Watch "A better way to display a login failure message" New topic
Author

A better way to display a login failure message

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Hi,

I'm using Spring 3.0. I have this in my securityContext.xml file ...



Then on my login.jsp page, I have this login for displaying an error when login fails ...



However, this seems a little dopey, and I was wondering if there is a more elegant way to get the error message to display. Right now, someone could (for whatever odd reason), add the "?fail" string to the page and get the login error to come up.

Thanks, - Dave
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

Looks like a good message to me. Why would you care if someone puts that in the URL and makes the error message display. It isn't like it gives them some secret way into your site.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Geeta Puttappanavar
Ranch Hand

Joined: Jan 18, 2012
Posts: 43
Mark Spritzler wrote:Looks like a good message to me. Why would you care if someone puts that in the URL and makes the error message display. It isn't like it gives them some secret way into your site.

Mark



Hi All,

I want to validate the form in spring security (displaying not empty, size related errors in login.jsp which we achieve it by @valid in spring MVC).

Can any of you please guide me how to achieve this?

Here I am using j_username and j_password spring security property in login.jsp.

Thanks in advance,
Geeta
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A better way to display a login failure message