You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Trevor Griffiths <tg...@tcmg.com> on 2001/04/10 01:12:04 UTC

Problem with bean:struts tag

Hi,

I am trying to use the bean:struts and bean:write tags to expose(copy) an
action form bean and print a property.  However when I use the bean:write
tag it tells me that there is no getter method for the specified
property(helloMessage).
As can be seen in the code below, directly before the bean tags I have
successfully used the form bean inside the form tags and it prints the
specified property with no problems. That is: There is a gettter method for
this particular form bean property, and it works).
I have assumed that I need to first expose(copy) the form bean with
bean:struts and then write the property with bean:write. Is this incorrect?
What am I doing wrong?

Here is the jsp fragment in question:

------------------------------------------------------------
<html:form action="/helloworld">
	<html:text property="helloMessage" size="50"/>
</html:form>
<br>
<br>
<bean:struts id="helloBean" formBean="helloworldForm"/>
<bean:write name="helloBean" property="helloMessage"/>
------------------------------------------------------------

The form bean xml mapping is:
<form-bean name="helloworldForm" type ="/HelloworldForm"/>

Thanks

Trev...