ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Using the Validator Framework with Struts
Subject:   configuring validator.xml
Date:   2006-08-17 03:19:03
From:   jasna
I'm trying to configure validation.xml using
action path instead of form name (in form element) but I'm getting an error
ActionForm doesn't exist.Seems like not accepting
action path instead of form name.


struts-conf.xml
...........
<action name="templateForm" path="/AddNewTemplate" scope="session" type="com.infinica.admin.actions.SaveTemplateAction" input="/newTemplate.jsp" validate="true">
<forward name="showInserted" path="/jsp/showInsertTemplate.jsp" />
<forward name="error" path="/jsp/newTemplate.jsp">
</forward>
</action>
............
validation.xml
......
<!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN" "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
<form-validation>

<formset>
<form name="/AddNewTemplate">
<field property="version" depends="required">
<arg0 key="label.template.version" />
</field>
</form>


</formset>
</form-validation>


What could be an possible reason for that? I tried all possible versions of dtd file, I read articles and I have Jakarta Struts book but I couldn't find a reason why?