You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by dg...@apache.org on 2003/02/05 06:28:53 UTC

cvs commit: jakarta-struts/src/share/org/apache/struts/util RequestUtils.java

dgraham     2003/02/04 21:28:53

  Modified:    src/share/org/apache/struts/util RequestUtils.java
  Log:
  Cosmetic changes only.
  
  Revision  Changes    Path
  1.80      +15 -16    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.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- RequestUtils.java	12 Jan 2003 20:31:21 -0000	1.79
  +++ RequestUtils.java	5 Feb 2003 05:28:52 -0000	1.80
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -1354,13 +1354,12 @@
        * Return the context-relative URL that corresponds to the specified
        * {@link ForwardConfig}, relative to the module associated
        * with the current {@link ModuleConfig}. The forward path is
  -     * gracefully prefixed with a '/' according to the boolean
  -     *
  +     * gracefully prefixed with a '/' according to the boolean.
        *
        * @param request The servlet request we are processing
        * @param forward ForwardConfig to be evaluated
        * @return context-relative URL
  -     * @since Struts 1.1b2
  +     * @since Struts 1.1
        */
       public static String forwardURL(HttpServletRequest request, ForwardConfig forward) {
   
  @@ -1377,11 +1376,11 @@
           }
   
           // Calculate a context relative path for this ForwardConfig
  -        ModuleConfig appConfig = (ModuleConfig) request.getAttribute(Globals.MODULE_KEY);
  -        String forwardPattern = appConfig.getControllerConfig().getForwardPattern();
  +        ModuleConfig moduleConfig = (ModuleConfig) request.getAttribute(Globals.MODULE_KEY);
  +        String forwardPattern = moduleConfig.getControllerConfig().getForwardPattern();
           if (forwardPattern == null) {
               // Performance optimization for previous default behavior
  -            sb.append(appConfig.getPrefix());
  +            sb.append(moduleConfig.getPrefix());
               // smoothly insert a '/' if needed
               if (!path.startsWith("/")) {
                   sb.append("/");
  @@ -1394,7 +1393,7 @@
                   if (dollar) {
                       switch (ch) {
                           case 'M' :
  -                            sb.append(appConfig.getPrefix());
  +                            sb.append(moduleConfig.getPrefix());
                               break;
                           case 'P' :
                               // add '/' if needed
  @@ -1437,10 +1436,10 @@
       public static String pageURL(HttpServletRequest request, String page) {
   
           StringBuffer sb = new StringBuffer();
  -        ModuleConfig appConfig = (ModuleConfig) request.getAttribute(Globals.MODULE_KEY);
  -        String pagePattern = appConfig.getControllerConfig().getPagePattern();
  +        ModuleConfig moduleConfig = (ModuleConfig) request.getAttribute(Globals.MODULE_KEY);
  +        String pagePattern = moduleConfig.getControllerConfig().getPagePattern();
           if (pagePattern == null) {
  -            sb.append(appConfig.getPrefix());
  +            sb.append(moduleConfig.getPrefix());
               sb.append(page);
           } else {
               boolean dollar = false;
  @@ -1449,7 +1448,7 @@
                   if (dollar) {
                       switch (ch) {
                           case 'M' :
  -                            sb.append(appConfig.getPrefix());
  +                            sb.append(moduleConfig.getPrefix());
                               break;
                           case 'P' :
                               sb.append(page);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org