dgraham     2003/02/05 19:01:59

  Modified:    src/share/org/apache/struts/util RequestUtils.java
  Log:
  Renamed getApplicationPrefixes to getModulePrefixes.
  
  Revision  Changes    Path
  1.81      +19 -5     
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.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- RequestUtils.java 5 Feb 2003 05:28:52 -0000       1.80
  +++ RequestUtils.java 6 Feb 2003 03:01:58 -0000       1.81
  @@ -1642,7 +1642,7 @@
           }
   
           String prefix = ""; // Initialize prefix before we try lookup
  -        String prefixes[] = getApplicationPrefixes(context); // Get all other 
possible prefixes
  +        String prefixes[] = getModulePrefixes(context); // Get all other possible 
prefixes
           int lastSlash = 0; // Initialize before loop
   
           while (prefix.equals("") && ((lastSlash = matchPath.lastIndexOf("/")) > 0)) 
{
  @@ -1722,8 +1722,22 @@
        *
        * @param context The ServletContext for this web application
        * @return an array of module prefixes
  +     * @deprecated Use getModulePrefixes(ServletContext) instead.
        */
       public static String[] getApplicationPrefixes(ServletContext context) {
  +        return getModulePrefixes(context);  
  +    }
  +
  +    /**
  +     * Return the list of module prefixes that are defined for
  +     * this web application, creating it if necessary.  <strong>NOTE</strong> -
  +     * the "" prefix for the default module is not included in this list.
  +     *
  +     * @param context The ServletContext for this web application
  +     * @return an array of module prefixes
  +     * @since Struts 1.1
  +     */
  +    public static String[] getModulePrefixes(ServletContext context) {
   
           String prefixes[] = (String[]) context.getAttribute(PREFIXES_KEY);
           if (prefixes != null) {
  
  
  

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

Reply via email to