This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

A better way to display a login failure message

 
Ranch Hand
Posts: 436
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Willie Smits can speak 40 languages. This tiny ad can speak only one:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic