Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with tag html:text value=...  RSS feed

 
Nirnay Rane
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!