• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with bean:write tag

 
Rafa Barcel� Bauz�
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic