martinc     2003/07/15 22:11:11

  Modified:    src/share/org/apache/struts/util Tag: STRUTS_1_1_BRANCH
                        RequestUtils.java
  Log:
  Make retrieveMessageResources() module-aware by adding the module prefix
  to the bundle name when retrieving from application context.
  
  PR: 11932
  Submitted by: Alex Kwan
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.105.2.2 +7 -8      
jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
  
  Index: RequestUtils.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v
  retrieving revision 1.105.2.1
  retrieving revision 1.105.2.2
  diff -u -r1.105.2.1 -r1.105.2.2
  --- RequestUtils.java 16 Jul 2003 04:57:44 -0000      1.105.2.1
  +++ RequestUtils.java 16 Jul 2003 05:11:10 -0000      1.105.2.2
  @@ -1062,9 +1062,6 @@
        * default bundle name is used.
        * @return MessageResources The bundle's resources stored in some scope. 
        * @throws JspException if the MessageResources object could not be found.
  -     * 
  -     * @FIXME The bundle name needs the module prefix appended to it before 
searching
  -     * to fix PR# 11932.
        */
       private static MessageResources retrieveMessageResources(
           PageContext pageContext,
  @@ -1093,9 +1090,11 @@
           }
   
           if (resources == null) {
  +            ModuleConfig config = (ModuleConfig) pageContext.getAttribute(
  +                    Globals.MODULE_KEY, PageContext.REQUEST_SCOPE);
               resources =
                   (MessageResources) pageContext.getAttribute(
  -                    bundle,
  +                    bundle + config.getPrefix(),
                       PageContext.APPLICATION_SCOPE);
           }
   
  
  
  

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

Reply via email to