WntFramework is in application context and not in request.

Manish Singla

Matt Minyard wrote:
Hi,
I have defined a Message Resource defined in my struts-config.xml file like:
<message-resources parameter="wnt-FrameworkResources" key="WntFramework" null="false"/>
I can access the key/values in my JSPs without a problem. For example:
<bean:message key="wntLogin.title" bundle="WntFramework" />
However, when I try to access the Message Resource from an ActionForm, I can't get an instance. For example, when I try this code
MessageResources resources =
(MessageResources) req.getAttribute("WntFramework");
I just get null for my resources reference.
Does anyone have any suggestions?
It doesn't appear as though there is a MessageResource instance in the request. When I dump the request, I get:


org.apache.struts.action.mapping.instance = ActionConfig[path=/Login,forward=/jsp/login.jsp,scope=request

WntLogin = [EMAIL PROTECTED]

org.apache.struts.action.MODULE = [EMAIL PROTECTED]

I can see the "default" MessageResource in the request dump; the one defined without a key. Also, in my Action, I can access all Message Resource bundles using getRequest(req, "key"), but in my ActionForm, I can only get the default one.
Thanks,
Matt





--------------------------------- Do you Yahoo!? Free Pop-Up Blocker - Get it now


--
Thanks
Manish Singla
x73166


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



Reply via email to