• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with tag html:text value=...

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic