Results 1 to 3 of 3

Thread: Login page validation

  1. #1
    Join Date
    Mar 2005
    Location
    Sterling, VA USA
    Posts
    34

    Default 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 j_acegi_security_check.do) and validate these values using struts.

    Any thoughts on this?

  2. #2
    Join Date
    Mar 2005
    Location
    Sterling, VA USA
    Posts
    34

    Default

    any idea?

  3. #3
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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.

Similar Threads

  1. Replies: 17
    Last Post: Jan 2nd, 2007, 01:43 PM
  2. Pageable data list with Hibernate
    By robmorgan in forum Data
    Replies: 23
    Last Post: Jul 24th, 2006, 06:12 PM
  3. Replies: 3
    Last Post: Oct 31st, 2005, 03:23 AM
  4. Replies: 0
    Last Post: Aug 30th, 2005, 08:01 AM
  5. Replies: 1
    Last Post: Mar 22nd, 2005, 07:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •