Wednesday, July 11, 2007

No form found under 'null' in locale 'en_US'. A form must be defined in the Commons Validator configuration when dynamicJavascript=&q

As soon as I put <html:javascript /> tag in the jsp, I get this error.
It indicates that it is unable to find a formset.

Solution: Did not add the form name with the tag
ex:

2 comments:

vandeir.desenv said...

This message occur because tag "html:javascript" require a reference of the form in validation.xml file.
Done this you can use the "formName" in tag "html:javascript" without generate an error.
Ex.:
<form-validation>
<formset>
<form name="myForm">
</form>
...
You coudn't forget to create an "onsubmit" event in html:form, like this:

<html:form name="myForm" onsubmit="return validateMyForm(this)">
...

Unknown said...

I meet the same problem when i update the [Struts1.1] into [1.2].
After read this doc,i still can not find my answer.

●jsp:




●js:
function addXX()
{
var XXXForm= document.forms["XXXForm"];
if(validateXXXForm(XXXForm))
{
....
XXXForm.submit();
}
}

●validation.xml


●struts-config.xml






⇒Anyone who can give me same suggestion ?Thanks.

86282921@qq.com