accessing resources from tags
1 posts in topic
Flat View  Flat View

Posted By:   itamar_tayer
Posted On:   Monday, February 9, 2004 06:43 AM

In my struts app I'm accessing the resources in action classes using getResources(request).
My question is how do I access the resources in code that isn't part of the action, for example if i want to develope a tag that access the resources in the doStart method, how do i do that?

Re: accessing resources from tags

Posted By:   Vinay_Sarwate  
Posted On:   Friday, February 13, 2004 04:35 PM

Though not a very clean approach but following code in your tag will return you MessageResources class stored by Struts.

MessageResources resources = (MessageResources) pageContext.getSession().getServletContext().getAttribute(Globals.MESSAGES_KEY);

Hope this helps !!!
About | Sitemap | Contact