Struts 1: Access MessageResources from doStartTag in TagSupport
Adam Stokar
Greenhorn
Joined: Sep 01, 2010
Posts: 2
posted
0
I am trying to pull in my Struts (1.3) ApplicationResources.properties file (based on the locale of the request) inside the doStartTag method of a Java Tag. I am using the following code :
Is there a better way to do this? This is the same code used in the Action.getResources(request) method but it doesn't seem to be working in the context of the tag.
This message was edited 2 times. Last update was at by Adam Stokar
Adam Stokar
Greenhorn
Joined: Sep 01, 2010
Posts: 2
posted
0
I figured it out, here's the solution in case anyone else needs it:
The string passed into the getMessageResources(String) method should be the parameter attribute of the <message-resources> tag in your struts-config.xml.
subject: Struts 1: Access MessageResources from doStartTag in TagSupport