struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksandar Matijaca <>
Subject embedding forms
Date Thu, 07 Jul 2005 18:01:22 GMT
Hi there,

I am having a problem, trying to embed one ValidatorForm inside of another 
--- specifically this is the situation:

I have a class InstitutionForm and a class DnaForm -- I am trying to do the 

public class InstitutionForm extends ValidatorForm {

private DnaForm dnaForm;

private String institution_name;

public String getInstitution_name() {
return institution_name;

public void setInstitution_name(String institution_name) {
this.institution_name = institution_name;

public DnaForm getDnaForm() {
return dnaForm;
public void setDnaForm(DnaForm dnaForm) {
this.dnaForm = dnaForm;


public class DnaForm extends ValidatorForm {

private String first_name;

public String getFirst_name() {
return first_name;
public void setFirst_name(String first_name) {
this.first_name = first_name;


In my JSP, I have the following:

<html:form action="/processRequestAccess" method="POST">
<table border="1">
<td><bean:message key="institution-name" /></td>
<td><html:text property="institution_name" /></td>
<td><bean:message key="title" /></td>
<td><bean:message key="address1" /></td>
<td><bean:message key="first-name" /></td>
<td><html:text property="dnaForm.first_name" /></td> <!-- DOESN'T LIKE


the rendered JSP produces this:

12:25:33,653 INFO [TilesRequestProcessor] Tiles definition factory found for 
request processor ''.
12:25:36,567 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Invalid argument looking up property 
dnaForm.first_name of bean org.apache.struts.taglib.html.BEAN
at org.apache.struts.taglib.TagUtils.lookup(
at org.apache.struts.taglib.html.BaseFieldTag.renderInputElement(
at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(
at org.apache.jsp.WEB_002dINF.jsp.common.request_005faccess_jsp._jspService(
at org.apache.jasper.runtime.HttpJspBase.service(

I am using JBoss 4.x

It is obvious, that the jsp rendering does not 'like' the
dnaForm.first_name--- is there a decent way of embedding these
Validatorform, one inside of
the other,
or should I just do a InstutionForm extends DnaForm instead??

Thanks, Alex.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message