>> p. Now i have got the debugging working. But 
Since debugging is working, try catching a breakpoint where validate is
being called, then step-into...
My best guess is the method signatures need to be verified. INO, are you
overridding validate or overloading? You may be invoking the superclass
validate instead of the intended forms' validate. If all else fails,
place a breakpoint/sys.out in Struts' ActionForm.validate to see if it's
getting there.

Happy debugging,
Duane

-----Original Message-----
From: Jay Sheth [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 10, 2005 9:23 AM
To: Struts Users Mailing List
Subject: validate() not called haunts

Hi,
Thanks for all the help. Now i have got the debugging working. But still
the problem remains, validate() not being called. I tried all
combinations...I made a simple action and form without any business
logic etc...but i dont understand why validate method is being called in
only a single form and not being called for any other forms.

Most weird error. 

Even if I call validate from the corresponding action, it does not get
called. However if I rename the validate method by another method e..g
update then I can call the update method from action.

Is there a way that the action errors created can be shown as error by
jsp page ?

Heres the code ;
**action
form.update(mapping,request); // form.validate() doesnt get called so i
renamed
                                                to update()

**form
public ActionErrors update(ActionMapping mapping, ServletRequest
request) {
     super.validate(mapping,servlet);
    errors = new ActionErrors();
if (nullOrBlank(m_location)) {
errors.add("Location",new
ActionError("errors.location.required"));
                        }
    return new ActionErrors();
} 

So basically the action class can get the errors, but how should i
display that errors on jsp (This is all because validate() not being
called).

Jay

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

Reply via email to