Hi,

I'm still in the process of learning struts... but I have a HTML form with
an input field:


<bean:define id="sourceDate" name="sourceDate" type="java.lang.String"/>
...
<html:text property="sourceDate" styleClass="input"/>

This string sourceDate is set in advance in a java class (extending Action):

sourceDate="2005/10/14";
request.setAttribute("sourceDate", sourceDate);

If I write in my jsp page <bean:write name="sourceDate"/> the correct string
is shown in the HTML output. So I'm sure that the value for sourceDate is
correctly handed over to the jsp page.

However, in the form above, the html input field does not contain the
string of sourceDate as default value. If I add name="sourceDate" to the
<html:text .../> line, I get the following exception:

javax.servlet.ServletException: No getter method for property sourceDate of
bean sourceDate

Is there a way to easily fix this?


Sebastian

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to