jQuery in Action, 3rd edition
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

problem with tag html:text value=...

Nirnay Rane

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

type="OtherBean" />

<html:form action="/DisplayGraphStep2">

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

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.

Consultant, Sima Solutions
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: problem with tag html:text value=...
It's not a secret anymore!