Thank you for your reply.
Are you saying that only the "default" MessageResource is available in the request,
while all others are in the application context?
I was wondering about this, but I thought it was odd that from the Action, I could get
the MessageResource (using getResource(req, "key") ).
Thanks,
Matt
Manish Singla <[EMAIL PROTECTED]> wrote:
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:
>
>
>
>
>
>
>
> I can access the key/values in my JSPs without a problem. For example:
>
>
>
>
>
>
> 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]
---------------------------------
Do you Yahoo!?
Free Pop-Up Blocker - Get it now