Announcement Announcement Module
No announcement yet.
Login page validation Page Title Module
Move Remove Collapse
This topic is closed
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Login page validation

    I am using form based authentication (action=j_acegi_security_check). How can I provide a field validation on user name and password (such as should not be empty) using struts. I do not want to use javascript.

    As this is a special action understood only by authenticationProcessingFilter, it will try to authenticate without any validation. I don't want my authenticationProvider being invoked at all if username and password are not validate (not empty, length etc).

    I am thinking may be I should provide a new filter with a url mapping to j_acegi_security_check (or by making it and validate these values using struts.

    Any thoughts on this?

  • #2
    any idea?


    • #3
      You shouldn't have any problems using a controller to perform authentication, in effect simply skipping the involvement of AuthenticationProcessingFilter entirely. Just be aware of the ordering of ContextHolder interaction and your FilterChainProxy.