ekbush      2002/10/29 13:04:38

  Modified:    src/share/org/apache/struts/util RequestUtils.java
  Log:
  Updated selectApplication to be more friendly with Cactus and StutsTestCase.
  
  It would seem when run under Cactus/StrutsTestCase, the URI handed to
  selectApplication does not have an initial "/".  While this seems abnormal
  to me, things work just fine with selectApplication not paying any attention
  to whether or not there is an initial "/" in the URI it gets.
  
  Revision  Changes    Path
  1.65      +5 -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.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- RequestUtils.java 18 Oct 2002 15:27:43 -0000      1.64
  +++ RequestUtils.java 29 Oct 2002 21:04:38 -0000      1.65
  @@ -1456,7 +1456,7 @@
           int lastSlash = 0;  // Initialize before loop
           
           while (prefix.equals("") &&
  -               ((lastSlash = matchPath.lastIndexOf("/")) != 0)) {
  +               ((lastSlash = matchPath.lastIndexOf("/")) > 0)) {
               
               // We may be in a non-default module.  Try to get it's prefix.
               matchPath = matchPath.substring(0, lastSlash);
  
  
  

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

Reply via email to