Results 1 to 2 of 2

Thread: Problem while working with ClientSide Validations in Struts

  1. #1
    Junior Member
    Join Date
    Nov 2007
    Answers
    7

    Problem while working with ClientSide Validations in Struts

    why i am getting NullpointerException when i am trying to perform validation

    on Client side .In projects I am using ValidatorForm .Can any one reply to this


  2. #2
    Junior Member
    Join Date
    Dec 2007
    Answers
    3

    Re: Problem while working with ClientSide Validations in Struts

    First, extending ValidatorForm doesnt mean validations will be done at client. I order to make vaidations to be done at client side make sure include <html:script> tag in your jsp page.

    You are extending Validator form, make sure to do the follwing steps:

    Configuration aspects:

    1. Include <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property
    property="pathnames"
    value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
    </plug-in> in struts-config.xml

    2. Check whether "validate=true" is set in your associated <action> within struts-config-xml.

    3. define associated fileds in validation.xml files with necessary attributes (depends,property)

    Class extending ValidatorForm
    1. Override validate method, with ActionErrors errors=super.validate(mapping,request) followed by your field checking specific to your business rules.

    I am comfort with validatorForm with the above mentioned steps.

    I can help you more if you can provide me with your code snippets.

    Ganti.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact