portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject cvs commit: jakarta-jetspeed-2/content-server project.xml
Date Wed, 23 Mar 2005 22:35:08 GMT
ate         2005/03/23 14:35:08

  Modified:    content-server/src/java/org/apache/jetspeed/contentserver
                        ContentLocatingResponseWrapper.java
                        AbstractContentLocator.java
               content-server project.xml
  Log:
  Resolving http://issues.apache.org/jira/browse/JS2-210:
  Fixes on content-server needed to allow running on Tomcat 5.5:
  - handle writing to response.getWriter and response.getOutputStream properly
  - translate absolute file path on Windows in a proper basePath by replacing the path separator
  
  Revision  Changes    Path
  1.2       +29 -4     jakarta-jetspeed-2/content-server/src/java/org/apache/jetspeed/contentserver/ContentLocatingResponseWrapper.java
  
  Index: ContentLocatingResponseWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/content-server/src/java/org/apache/jetspeed/contentserver/ContentLocatingResponseWrapper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ContentLocatingResponseWrapper.java	16 Aug 2004 13:25:30 -0000	1.1
  +++ ContentLocatingResponseWrapper.java	23 Mar 2005 22:35:07 -0000	1.2
  @@ -13,6 +13,7 @@
   import javax.servlet.ServletOutputStream;
   import javax.servlet.http.HttpServletResponse;
   import javax.servlet.http.HttpServletResponseWrapper;
  +import org.apache.pluto.util.PrintWriterServletOutputStream;
   
   /**
    * <p>
  @@ -35,6 +36,8 @@
       private boolean locationAttempted = false;
       protected boolean outputStreamCalled;
       protected boolean writerCalled;
  +    protected PrintWriter writer;
  +    protected ServletOutputStream outputStream;
   
       /**
        * @param arg0
  @@ -138,7 +141,18 @@
       public ServletOutputStream getOutputStream() throws IOException
       {
           outputStreamCalled = true;
  -        return super.getOutputStream();
  +        if ( outputStream == null )
  +        {
  +          if ( writerCalled )
  +          {
  +            outputStream = new PrintWriterServletOutputStream(writer);
  +          }
  +          else
  +          {
  +            outputStream = super.getOutputStream();
  +          }
  +        }
  +        return outputStream;
       }
       /**
        * <p>
  @@ -152,6 +166,17 @@
       public PrintWriter getWriter() throws IOException
       {
           writerCalled = true;
  -        return super.getWriter();
  +        if ( writer == null )
  +        {
  +          if ( outputStreamCalled )
  +          {
  +            writer = new PrintWriter(outputStream);
  +          }
  +          else
  +          {
  +            writer = super.getWriter();
  +          }
  +        }
  +        return writer;
       }
  -}
  \ No newline at end of file
  +}
  
  
  
  1.2       +4 -2      jakarta-jetspeed-2/content-server/src/java/org/apache/jetspeed/contentserver/AbstractContentLocator.java
  
  Index: AbstractContentLocator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/content-server/src/java/org/apache/jetspeed/contentserver/AbstractContentLocator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractContentLocator.java	16 Aug 2004 13:25:30 -0000	1.1
  +++ AbstractContentLocator.java	23 Mar 2005 22:35:08 -0000	1.2
  @@ -185,8 +185,10 @@
           if (basePath == null)
           {
               String absPath = getRealPath();
  +
               if (absPath != null)
               {
  +                absPath = absPath.replace('\\','/');
                   int startOffset = absPath.indexOf(contextRoot) + contextRoot.length();
                   basePath = absPath.substring(startOffset, absPath.length());
               }
  @@ -199,4 +201,4 @@
   
       }
   
  -}
  \ No newline at end of file
  +}
  
  
  
  1.11      +8 -0      jakarta-jetspeed-2/content-server/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/content-server/project.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- project.xml	25 Sep 2004 23:03:17 -0000	1.10
  +++ project.xml	23 Mar 2005 22:35:08 -0000	1.11
  @@ -63,6 +63,14 @@
           <war.bundle>false</war.bundle>
         </properties> 
       </dependency>
  +    <dependency>
  +      <id>pluto</id>
  +      <groupId>pluto</groupId>
  +      <version>1.0.1-rc1</version>
  +      <properties>
  +        <war.bundle>false</war.bundle>
  +      </properties>
  +     </dependency>
     </dependencies>
   
     <build>
  
  
  

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


Mime
View raw message