• 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

bean:message and bean:write

 
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to output a message from ApplicationResources.properties while passing in an arg. The value I want to pass as an arg is in the FormBean. However, I cannot pass a variable to the message tag without using scriptlets. What is a good way to do this?



How to I pass a vatiable into bean:message?
[ November 02, 2006: Message edited by: Chris Novindus ]
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use the Struts-el version of the tags. Then you can substitute an EL expression.

To use the Struts-el version, use the following taglib definition:

<%@ taglib uri="http://struts.apache.org/tags-bean-el" prefix="bean" %>

and make sure you have struts-el.jar, jstl.jar, and standard.jar in your classpath.

Then you can write:

Where myForm is the name of your ActionForm.
[ November 03, 2006: Message edited by: Merrill Higginson ]
 
Cob is sand, clay and sometimes straw. This tiny ad is made of cob:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic