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

Reply via email to