Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bean:message and bean:write

 
Chris Boldon
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • 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 ]
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic