better is struts user list ;-)

You need to get the MessageResources object, which is saved in the session and in the request under the key Globals.MESSAGES_KEY. If you have this object you can call the method

message = resources.getMessage(userLocale, key);

or

message = resources.getMessage(userLocale, key, args);

als you will.


In tags you can use the TagUtil class TagUtils and you can call the message message


/**
* Look up and return a message string, based on the specified parameters.
*
*/
public String message(
PageContext pageContext,
String bundle,
String locale,
String key)
throws JspException {
}


Manfred Wolff

[EMAIL PROTECTED] wrote:

Hi All,



I have a problem in struts development. I have to generate content from
a custom tag. but I want to display the labels in multilingual format
for which I need to use <bean:message /> tag.

But from a custom tag we can't use another tag like
out.println("<bean:message..../>")

This will be executed/evaluated as a string not as a tag.



How do I access "a message associated with a key in application
resources file programmatically"?



Plz kindly provide me a approach to come out of this problem.



Regards,

M.Srinivas Amarnadh

i-Flex Solutions Ltd.,

4th Floor, Shankar Narayana building,

M G Road,

Bangalore - 560001.

Phone: +91-80-25321440, x: 3887.








---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to