• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Validation, problem with using action path instead of form name

Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

<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">

<!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 name="/AddNewTemplate">
<field property="version" depends="required">
<arg0 key="label.template.version" />


What could be an possible reason for that? I tried all possible versions of dtd file.

Thank you in advance.
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does your TemplateForm extend ValidatorActionForm? If not, that's the problem.

You extend ValidatorForm if you're using the name of the form for validation, and you extend ValidatorActionForm if you're using the name of the action.
Jasna Dosen
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, of course.Here is code of my form that extends ValidatorActionForm:

public class TemplateForm extends ValidatorActionForm {

public TemplateForm() {
// TODO Auto-generated constructor stub
private static final long serialVersionUID = 1L;
private Integer id;
private String name = "";
private Integer version;
private byte[] itd;
private FormFile xslt;
private String creationTime;
private String modificationTime;
private Integer[] listSelected;

public String getCreationTime() {
return creationTime;
public void setCreationTime(String creationTime) {
this.creationTime = creationTime;
public byte[] getItd() {
return itd;
public void setItd(byte[] itd) {
this.itd = itd;
public String getModificationTime() {
return modificationTime;
public void setModificationTime(String modificationTime) {
this.modificationTime = modificationTime;
public String getName() {
return this.name;
public void setName(String name) {
this.name = name;
public Integer getVersion() {
return version;
public void setVersion(Integer version) {
this.version = version;
public FormFile getXslt() {
return xslt;
public void setXslt(FormFile xslt) {
this.xslt = xslt;
public void setId(Integer id) {
this.id = id;
public Integer getId() {
return this.id;
public Integer[] getListSelected() {
return listSelected;
public void setListSelected(Integer[] listSelected) {
this.listSelected = listSelected;

public ActionErrors validate(
ActionMapping mapping,
HttpServletRequest request) {

return super.validate(mapping, request);



It looks like syntax check doesn't allowed that I put action path instead of form name.

As a addition part from struts-config.xml

<form-bean name="templateForm" type="com.infinica.admin.forms.TemplateForm">
It's never done THAT before. Explain it to me tiny ad:
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic