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

bean:write inside html:text

Mark Butcher
Ranch Hand

Joined: Jun 28, 2012
Posts: 46
Hi there,

Not able to display values with <bean:write> inside <html:text> using Struts 1.3

Here is the code :
Action Class
--------------

JSP Code
-----------


Thank you.
Mark
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

You cannot use a custom tag as the attribute value of another custom tag.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mark Butcher
Ranch Hand

Joined: Jun 28, 2012
Posts: 46
Okay.....but an alternative would really help me.
Karthik Jayachandran
Ranch Hand

Joined: Feb 18, 2009
Posts: 88

Mark Butcher wrote:Okay.....but an alternative would really help me.


Try iterating using JSTL tags
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

Mark Butcher wrote:Okay.....but an alternative would really help me.

I would be using JSTL and EL rather than proprietary tags. The EL can be used as attribute values.
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 5018
    
    8

Or you could use the version of the Struts tags that work with EL: http://struts.apache.org/1.x/struts-el/tagreference.html#struts-html-el.tld


Junilu - [How to Ask Questions] [How to Answer Questions]
Mark Butcher
Ranch Hand

Joined: Jun 28, 2012
Posts: 46
I would really appreciate an example.
Thanks.
Gopakumar Naryanan
Ranch Hand

Joined: Jan 15, 2011
Posts: 72

<HTML:text property='name' value='${emp.name}></html:text> where property is your formbean property and value is what you were trying to put in bean:write tag emp is bean name and name is the property.


Thanks & Regards
Gopakumar
 
 
subject: bean:write inside html:text