Please send your code of tag <html:text>
 
But if you specify 'sourceDate' in the name that means that you will look in the bean sourceDate and not that you will display its value...don't know if you see the difference...send more lines of code

Cordialement,
 Visiter le site Internet du CCPB14Ecrire un e-mail à Mr Gaëtan LEPARGNEULVisiter le site Internet du CCPB14
----- Original Message -----
Sent: Wednesday, November 30, 2005 5:33 PM
Subject: Why does <html:text property="..."/> has no value?

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