problem with struts validation

hi experts,

I am using struts in Jbuilder 2005 with weblogic application server.
For some reason my field validations are not getting enabled.

My JSP page----------

<html:form action="/incidentManagement.do?method=saveIncidentType" method="post">
<html:errors/>

<table width="100%" border="0" cellspacing="1" cellpadding="0">
                            <html:text styleClass="formstyle" property="submittingOrganization" size="20"/>
                          </table>
</html:form>

MY STRUTS CONFIG--------

<action name="incidentsBn" path="/incidentManagement" parameter="method" validate="true"
            input="/WEB-INF/pages/commandcenter/incidents/heprCCCAddIncident.jsp"   type="gov.njdhss.hippocrates.commandcenter.action.incidents.IncidentsAction">

            <forward name="listIncidents"
                   path="/incidentManagement.do?method=listIncidents" />
            <forward name="listIncidentsPg"
                   path="/WEB-INF/pages/commandcenter/incidents/heprCCCListIncidents.jsp" />
            <forward name="findIncidentsPg"
                   path="/WEB-INF/pages/commandcenter/incidents/heprCCCFindIncidents.jsp" />
            <forward name="listFoundIncidentsPg"
                    path="/WEB-INF/pages/commandcenter/incidents/heprCCCFoundIncidents.jsp" />
            <forward name="updateIncidentsPg"
                   path="/WEB-INF/pages/commandcenter/incidents/heprCCCUpdateIncident.jsp" />
            <forward name="errorIncidents"
                   path="/WEB-INF/pages/commandcenter/incidents/heprCCCErrorIncident.jsp" />
            <forward name="incidentConfirmationPg"
                   path="/WEB-INF/pages/commandcenter/incidents/heprCCCIncidentConfirmation.jsp" />
            <forward name="createIncidentsLocationPg"
                  path="/WEB-INF/pages/commandcenter/incidents/heprCCCAddIncident.jsp" />
            <forward name="createIncidentsPg"
                  path="/WEB-INF/pages/commandcenter/incidents/heprCCCAddIncident.jsp" />
      </action>


 <form-bean name="incidentsBn" dynamic="true"
              type="gov.njdhss.hippocrates.commandcenter.action.incidents.IncidentsFormBean"/>


MY VALIDATION.XML fILE------------

<form name="incidentsBn">


<field property="submittingOrganization" depends="required">
<arg0 key="submittingOrganization.msg"/>
</field>


</form>


AND MY APPLICATION RESOURCEs
#Errors messages
errors.required={0} is Required.
submittingOrganization.msg = Submitting Organization




any help would be greatly appreciated

thanks ,
J
LVL 10
jaggernatAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

actonwangCommented:
did you put the following in your struts-config.xml ?


      <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
            <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
      </plug-in>
actonwangCommented:
Also, make sure your formbean extends ValidatorForm.

Acton
jaggernatAuthor Commented:
yes i did put the plug-in

also , this is my dtd info in validatio.xml file .
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE form-validation PUBLIC
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
"http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">

Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

jaggernatAuthor Commented:
>>>>>Also, make sure your formbean extends ValidatorForm

 does validation framework not work with Action Forms?
actonwangCommented:
>> does validation framework not work with Action Forms?

     In order to trigger the validation, you need to extends ValidatorForm.
actonwangCommented:
ValidatorForm is a subtype of Action Form which provides you validation capability.

If you just extend normal ActionForm, validation function will be turned on automactically.

see this:
http://www.oracle.com/technology/oramag/oracle/04-jan/o14dev_struts.html
jaggernatAuthor Commented:
i cannot use ValidaorForm now. we have completed 50% of the project using Actionform. Is there any other alternative

actonwangCommented:
>>i cannot use ValidaorForm now. we have completed 50% of the project using Actionform

     You don't need to replace all ActionForm by ValidatorForm. Only those forms which need to use validation. In this case, only incidentsFormBean has to be changed.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jaggernatAuthor Commented:
>>>only incidentsFormBean has to be changed

so does that mean i have to avoid using IncidentsformBean(action form) and put all the fields in struts config under <form-bean name=IndcidentformBean type="...DynavalidatorForm"..> tag

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JSP

From novice to tech pro — start learning today.