struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Lipscombe <>
Subject Passing user data via bean:message
Date Mon, 08 Sep 2008 13:43:18 GMT

Our app uses "<bean:messsage key="xxx"/>" extensively to access database backed application

resources. This works well, but as you would expect the message that is retrieved for any
given key 
is constant.

We want to extend this so that users in different business units are shown different messages.

e.g.  Users who are part of the "Accounts" business unit see message A, while users in the
business unit see message B.  AFAICS this involves passing application specific data via the

<bean:message> tag somehow.

How can I do this?

One thing that did occur to me was to use <bean:message name="<beanName>" property="propName"/>
access a bean that holds all the resources for that users business unit.
But one issue is that AFAICS the bean will have a fixed set of properties that tag can reference
the "property" attrib. If we have to add a new property to the resource database (which is
frequent) I don't want to have to re-code the backing bean.

Any ideas? Canonical solutions?

TIA - Adam
Adam Lipscombe

T: 01872 575083
M: 07957 548686

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message