I have to pass the value of form bean property to a java class funtion.
I am using the following syntax and it is giving me syntax error. can
any1 help me in it ?
<tr>
<td>
<%=myJavaClass.formatContent('<bean:write name="myActionForm"
property="name"/>');%>
</td>
</tr>
Try this:
<tr>
<td>
<bean:define id="test" name="myActionForm"
type="org.apache.struts.action.ActionForm"/>
<%=myJavaClass.formatContent(test.getName());%>
</td>
</tr>
I think org.apache.struts.action.ActionForm should be your own
ActionForm-Class.
kind regards
Markus
A r F a N - 30 Nov 2005 06:30 GMT
thx Markus for simplifyin my work :)
> I have to pass the value of form bean property to a java class funtion. I
> am using the following syntax and it is giving me syntax error. can any1
[quoted text clipped - 3 lines]
> <td>
> <%=myJavaClass.formatContent('<bean:write name="myActionForm"
^ Either get rid of the equals sign or...
> property="name"/>');%>
^ get rid of the semi-colon
> </td>
> </tr>

Signature
R. Scott Smith
Phoenix, AZ, USA
Slackware on the job, at home, everywhere!
Scott Smith - 30 Nov 2005 14:32 GMT
>> I have to pass the value of form bean property to a java class funtion.
>> I am using the following syntax and it is giving me syntax error. can
[quoted text clipped - 8 lines]
>> </td>
>> </tr>
Looks like my post wasn't formatted properly.
It should either be:
<% myJavaClass.formatContent('<bean:write name="myActionForm"
property="name"/>');%>
Or:
<%=myJavaClass.formatContent('<bean:write name="myActionForm"
property="name"/>') %>

Signature
R. Scott Smith
Phoenix, AZ, USA
Slackware on the job, at home, everywhere!