I imagine you'll have to parse that attribute yourself and use reflection to get that value.  I don't think Struts has support for this.  It might be difficult to keep it generic however, since I don't think there is way you can access the imports that are declared in a JSP page.
 
Of course, there's always this:
 
<html:userTargetedMessages messagesObjectKey="<%= Globals.MESSAGES_OBJECT %>"/>
 
Calvin
----- Original Message -----
From: Jonathan
Sent: Wednesday, June 27, 2001 10:03 AM
Subject: Global values as Tag parameters....How???

I am creating a custom Struts tag which needs to search for an object in a HashMap.  I want the 'key" for the object in the HashMap to be some agreed upon, pre-defined, final global value defined in a file available to the whole application.  How do I refer to this value in a Tag attribute?
 
eg.
<html:userTargetedMessages messagesObjectKey="Globals.MESSAGES_OBJECT"/>
 
where "Globals.MESSAGES_OBJECT" is some static final variable in a file

Reply via email to