struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ced...@apache.org
Subject cvs commit: jakarta-struts/src/share/org/apache/struts/util RequestUtils.java
Date Wed, 10 Jul 2002 14:57:10 GMT
cedric      2002/07/10 07:57:10

  Modified:    src/share/org/apache/struts/util RequestUtils.java
  Log:
  Remove the automatic '/' prefixing in forwardURL(). This systematic prefixing
  forbids the use of Tiles definition name as path in forward.
  It is the user responsability to put the '/' before an URL.
  
  Revision  Changes    Path
  1.47      +10 -4     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.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- RequestUtils.java	10 Jul 2002 00:00:19 -0000	1.46
  +++ RequestUtils.java	10 Jul 2002 14:57:10 -0000	1.47
  @@ -1191,9 +1191,11 @@
           // Handle a ForwardConfig marked as context relative
           StringBuffer sb = new StringBuffer();
           if (forward.getContextRelative()) {
  +            /* Disabled to let Tiles definition names unchanged !
               if (!path.startsWith("/")) {
                   sb.append("/");
               }
  +            */
               sb.append(path);
               return (sb.toString());
           }
  @@ -1206,9 +1208,11 @@
           if (forwardPattern == null) {
               // Performance optimization for previous default behavior
               sb.append(appConfig.getPrefix());
  +            /* Disabled to let Tiles definition names unchanged !
               if (!path.startsWith("/")) {
                   sb.append("/");
               }
  +            */
               sb.append(path);
           } else {
               boolean dollar = false;
  @@ -1220,9 +1224,11 @@
                           sb.append(appConfig.getPrefix());
                           break;
                       case 'P':
  +                        /* Disabled to let Tiles definition names unchanged !
                           if (!path.startsWith("/")) {
                               sb.append("/");
                           }
  +                        */
                           sb.append(path);
                           break;
                       case '$':
  
  
  

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


Mime
View raw message