aspose file tools*
The moose likes Struts and the fly likes problem with tag html:text value=... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem with tag html:text value=..." Watch "problem with tag html:text value=..." New topic
Author

problem with tag html:text value=...

Nirnay Rane
Greenhorn

Joined: Aug 03, 2005
Posts: 1
I am getting exception for the tag
<html:text property="NewTitle" value="<bean:write name="OtherBean" property="title"/>" ></html:text >

My JSP page similar as follows

---code------
<jsp:useBeanid="fillForm"
scope="request"
type="OtherBean" />

<html:form action="/DisplayGraphStep2">

Title : <html:text property="NewTitle" value="<bean:write name="OtherBean" property="title"/>" ></html:text >
</html:form>
---code------

This code doesn't work. gives an exception ..
org.apache.jasper.JasperException: /Step1.jsp(24,69) equal symbol expected

/DisplayGraphStep2 is asoociated with some other Form which contains geter,setter for NewTitle

Title : <html:text property="NewTitle" /> This code works.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
A feature of html:xxx tags that is not well documented is that if you put something in the body of the tag, it populates the value attribute.

In your example, this should work:

<html:text property="NewTitle"><bean:write name="OtherBean" property="title"/></html:text >

In my mind, though, the best way to handle this would be to have the action class set the value of myForm.newTitle to OtherBean.title before forwarding to the jsp.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with tag html:text value=...