cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon Utils.java
Date Sun, 23 Jan 2000 23:14:12 GMT
stefano     00/01/23 15:14:12

  Modified:    src/org/apache/cocoon Utils.java
  Log:
  fixed the problem with ServletExec and JRun
  
  Revision  Changes    Path
  1.5       +7 -5      xml-cocoon/src/org/apache/cocoon/Utils.java
  
  Index: Utils.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Utils.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Utils.java	2000/01/15 11:19:17	1.4
  +++ Utils.java	2000/01/23 23:14:11	1.5
  @@ -1,4 +1,4 @@
  -/*-- $Id: Utils.java,v 1.4 2000/01/15 11:19:17 ricardo Exp $ -- 
  +/*-- $Id: Utils.java,v 1.5 2000/01/23 23:14:11 stefano Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -61,7 +61,7 @@
    * Utility methods for Cocoon and its classes.
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.4 $ $Date: 2000/01/15 11:19:17 $
  + * @version $Revision: 1.5 $ $Date: 2000/01/23 23:14:11 $
    */
   
   public final class Utils {
  @@ -138,7 +138,8 @@
           
           while (nodes.hasMoreElements()) {
               String data = ((ProcessingInstruction) nodes.nextElement()).getData();
  -            for (StringTokenizer st = new StringTokenizer(data, " \t="); st.hasMoreTokens();)
{
  +            StringTokenizer st = new StringTokenizer(data, " \t=");
  +            while (st.hasMoreTokens()) {
                   String key = st.nextToken();
                   String token = st.nextToken();
                   token = token.substring(1, token.length() - 1);
  @@ -158,7 +159,8 @@
           Hashtable attributes = new Hashtable();
           
           String data = pi.getData();
  -        for (StringTokenizer st = new StringTokenizer(data, " \t="); st.hasMoreTokens();)
{
  +        StringTokenizer st = new StringTokenizer(data, " \t=");
  +        while (st.hasMoreTokens()) {
               String key = st.nextToken();
               String token = st.nextToken();
               token = token.substring(1, token.length() - 1);
  @@ -237,7 +239,7 @@
                   return request.getPathTranslated().replace('\\','/');
               } else {
                   // otherwise use the deprecated method on all other servlet engines.
  -                return request.getRealPath(request.getRequestURI());
  +                return request.getRealPath(request.getRequestURI()).replace('\\', '/');
               }
           } catch (MalformedURLException e) {
               throw new RuntimeException("Malformed request URL.");
  
  
  

Mime
View raw message