The moose likes Struts and the fly likes Bean:message and c:out Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Bean:message and c:out" Watch "Bean:message and c:out" New topic

Bean:message and c:out

Tony Smith
Ranch Hand

Joined: Mar 15, 2005
Posts: 77
I have a bean ${row}
An element of this bean is tranCodeT.
${row.tranCodeT} returns a key that's in my resource property file for i18n-age.

<bean:message...> seems to want a constant key, not something like ${row.tranCodeT}

<c ut...> seems to know nothing about the properties file.

How can I use struts to display the value from the property file?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
This link explains how to use JSTL with messaging. Basically, you'll want to use <fmt:message> rather than <bean:message> since the <fmt:message> tag accepts an EL value.

Consultant, Sima Solutions
I agree. Here's the link:
subject: Bean:message and c:out
It's not a secret anymore!