aspose file tools*
The moose likes Struts and the fly likes Problem with bean:write tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem with bean:write tag" Watch "Problem with bean:write tag" New topic
Author

Problem with bean:write tag

Rafa Barcel� Bauz�
Greenhorn

Joined: Aug 09, 2006
Posts: 22
Hello!!!

I'm working on struts 1.1 framework.

How can I pass an attributte tu a getter method like this??

<bean:write name"myBean" property="translation(lang).name" />

if I use

<bean:write name"myBean" property="translation(en).name" />

it works fine, but I need that the parameter to be non static...

Any idea???
Thanks!!!
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Why not just use an EL expression? For example if you have a variable "lang" that contains the language string, you could simply write ${translation[lang].name}.

If your web application uses Servlet version 2.4, you can just use the EL expression anywhere in your JSP. Otherwise, you have to enclose it in a cut tag. You can determine which version of the Servlet spec you're using by examining the DTD reference in your web.xml file.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with bean:write tag