martinc     02/02/28 22:24:00

  Modified:    src/share/org/apache/struts/util RequestUtils.java
  Log:
  Fix two problems related to multiple sub-apps and their associated message
  resources:
  
  - message() should look for message resources in request context instead of
    page context.
  - the module prefixes list should contain just the prefix list instead of
    the application key names.
  
  PR: 6756
  Submitted by: Chuck Cavaness
  
  Revision  Changes    Path
  1.30      +8 -6      
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.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- RequestUtils.java 26 Feb 2002 03:38:57 -0000      1.29
  +++ RequestUtils.java 1 Mar 2002 06:24:00 -0000       1.30
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.29 
2002/02/26 03:38:57 dwinterfeldt Exp $
  - * $Revision: 1.29 $
  - * $Date: 2002/02/26 03:38:57 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.30 
2002/03/01 06:24:00 martinc Exp $
  + * $Revision: 1.30 $
  + * $Date: 2002/03/01 06:24:00 $
    *
    * ====================================================================
    *
  @@ -110,7 +110,7 @@
    *
    * @author Craig R. McClanahan
    * @author Ted Husted
  - * @version $Revision: 1.29 $ $Date: 2002/02/26 03:38:57 $
  + * @version $Revision: 1.30 $ $Date: 2002/03/01 06:24:00 $
    */
   
   public class RequestUtils {
  @@ -730,7 +730,9 @@
           if (bundle == null) {
               bundle = Action.MESSAGES_KEY;
               resources = (MessageResources)
  -                pageContext.getAttribute(bundle);
  +                pageContext.getAttribute(bundle, PageContext.REQUEST_SCOPE);
  +
  +
           }
           if (resources == null) {
               resources = (MessageResources)
  @@ -1205,7 +1207,7 @@
                   context.getAttribute(name);
               String prefix = name.substring(Action.APPLICATION_KEY.length());
               if (prefix.length() > 0) {
  -                list.add(name);
  +                list.add(prefix);
               }
           }
           prefixes = (String[]) list.toArray(new String[list.size()]);
  
  
  

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

Reply via email to