I really appreciate all your help.

David,

I want to use struts validator and just control validation manually. Why do
I need saveErrors() method and what does it do? Isn't the validator does all
that. I am little confused.

I am pasting my execute method below, please let me know what should I add
to make it work.

The way it is wortkng now: it is giving me null pointer exception if I hit
go in the url for selstate.do action.
It is doing client site validation only if i hit submit button.

 public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws
IOException, ServletException
  {
       SelStateForm sform = (SelStateForm) form;
       String isSubmitted = sform.getIsSubmitted();
       if(isSubmitted == "Yes" || isSubmitted.equalsIgnoreCase("Yes"))
       {
           ActionErrors errors = sform.validate( mapping, request );       
            if((errors != null) && errors.size() > 0)
            {
             return mapping.findForward(mapping.getInput()); 
            }
       }         
    return mapping.findForward("success");
  }
}

Wendy, thanks for letting me know about making validate false in config
file.

Thanks.
Rosh
-- 
View this message in context: 
http://www.nabble.com/Question-about-Struts-validator-tf1851247.html#a5087526
Sent from the Struts - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to