cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/servlet CocoonServletRequest.java.Servlet22 CocoonServletResponse.java.Servlet22
Date Thu, 17 Feb 2000 08:39:47 GMT
pier        00/02/17 00:39:47

  Modified:    src/org/apache/cocoon/servlet Tag: xml-cocoon2-alpha0
                        CocoonServletRequest.java.Servlet22
                        CocoonServletResponse.java.Servlet22
  Log:
  Modifications for Servlet 2.2 compatibility.
  Thanks to Gerard van Enk <gerard.van.enk@eo.nl>.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +20 -22    xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServletRequest.java.Servlet22
  
  Index: CocoonServletRequest.java.Servlet22
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServletRequest.java.Servlet22,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- CocoonServletRequest.java.Servlet22	2000/02/14 13:17:22	1.1.2.1
  +++ CocoonServletRequest.java.Servlet22	2000/02/17 08:39:46	1.1.2.2
  @@ -27,7 +27,7 @@
     *         Exoffice Technologies, INC.</a>
     * @author Copyright 1999 &copy; <a href="http://www.apache.org">The Apache
     *         Software Foundation</a>. All rights reserved.
  -  * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/02/14 13:17:22 $
  +  * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/02/17 08:39:46 $
     */
    public class CocoonServletRequest implements Request, HttpServletRequest {
        /** Deny public construction */
  @@ -201,64 +201,62 @@
        public boolean isRequestedSessionIdFromCookie() {
   	 return(this.request.isRequestedSessionIdFromCookie());
        }
  -
  -     public boolean isRequestedSessionIdFromUrl() {
  -	 return(this.request.isRequestedSessionIdFromUrl());
  -     }
        
        public boolean isRequestedSessionIdFromURL() {
   	 return(this.request.isRequestedSessionIdFromURL());
        }
  -     
  -     // Methods below are added for servlet api 2.2 compatibility
  -     // These are dummy methods
   
  +     /** @deprecated use isRequestedSessionIdFromURL() instead */
  +     public boolean isRequestedSessionIdFromUrl() {
  +	 return(this.request.isRequestedSessionIdFromURL());
  +     }     
  +
        public HttpSession getSession() {
  -	 return null;
  +	 return(this.request.getSession());
        }
   
  -     public void setAttribute(String name, Object attribute) {}
  -
  -     public Enumeration getAttributes() {
  -	 return null;
  +     public void setAttribute(String name, Object attribute) {
  +	 this.request.setAttribute(name,attribute);
        }
   
        public Enumeration getAttributeNames() {
  -	 return null;
  +	 return(this.request.getAttributeNames());
        }
        
  -     public void removeAttribute(String name) {}
  +     public void removeAttribute(String name) {
  +	 this.request.removeAttribute(name);
  +     }
   
        public Locale getLocale() {
  -	 return null;
  +	 return(this.request.getLocale());
        }
   
        public Enumeration getLocales() {
  -	 return null;
  +	 return(this.request.getLocales());
        }
   
        public boolean isSecure() {
  -	 return false;
  +	 return(this.request.isSecure());
        }
   
        public RequestDispatcher getRequestDispatcher(String path) {
  -	 return null;
  +	 return(this.request.getRequestDispatcher(path));
        }
   
        public Enumeration getHeaders(String name) {
  -	 return null;
  +	 return(this.request.getHeaders(name));
        }
   
        public String getContextPath() {
  -	 return null;
  +	 return(this.request.getContextPath());
        }
   
        public boolean isUserInRole(String role) {
  -	 return false;
  +	 return(this.request.isUserInRole(role));
        }
   
        public java.security.Principal getUserPrincipal() {
  -	 return null;
  +	 return(this.request.getUserPrincipal());
        }
   }
   
  
  
  
  1.1.2.2   +35 -31    xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServletResponse.java.Servlet22
  
  Index: CocoonServletResponse.java.Servlet22
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServletResponse.java.Servlet22,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- CocoonServletResponse.java.Servlet22	2000/02/14 13:17:22	1.1.2.1
  +++ CocoonServletResponse.java.Servlet22	2000/02/17 08:39:47	1.1.2.2
  @@ -24,7 +24,7 @@
    *         Exoffice Technologies, INC.</a>
    * @author Copyright 1999 &copy; <a href="http://www.apache.org">The Apache
    *         Software Foundation</a>. All rights reserved.
  - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/02/14 13:17:22 $
  + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/02/17 08:39:47 $
    */
   public class CocoonServletResponse implements Response, HttpServletResponse {
       /** Deny public construction */
  @@ -189,23 +189,21 @@
        * Encodes the specified URL by including the session ID in it,
        * or, if encoding is not needed, returns the URL unchanged.
        */
  -    public String encodeUrl(String url) {
  +    public String encodeURL(String url) {
           return(this.response.encodeUrl(url));
       }
       
       /**
  -     * Encodes the specified URL for use in the
  -     * <code>sendRedirect</code> method or, if encoding is not needed,
  -     * returns the URL unchanged.
  -     * <br>
  -     * NOTE: (PF) This method calls simply <code>encodeUrl(url)</code> as the
  -     * complete URL mapping for rediriection is handled by the sitemap exception
  -     * handler.
  +     * Encodes the specified URL by including the session ID in it,
  +     * or, if encoding is not needed, returns the URL unchanged.
  +     *
  +     * @deprecated use encodeURL(String url) instead
        */
  -    public String encodeRedirectUrl(String url) {
  +    public String encodeUrl(String url) {
           return(this.response.encodeUrl(url));
       }
   
  +
       /**
        * Encodes the specified URL for use in the
        * <code>sendRedirect</code> method or, if encoding is not needed,
  @@ -218,6 +216,7 @@
       public String encodeRedirectURL(String url) {
           return(this.response.encodeUrl(url));
       }
  +
       /**
        * Encodes the specified URL for use in the
        * <code>sendRedirect</code> method or, if encoding is not needed,
  @@ -226,47 +225,52 @@
        * NOTE: (PF) This method calls simply <code>encodeUrl(url)</code> as the
        * complete URL mapping for rediriection is handled by the sitemap exception
        * handler.
  +     *
  +     * @deprecated use encodeRedirectURL(Strin url) instead
        */
  -    public String encodeRedirectURL(String url) {
  +    public String encodeRedirectUrl(String url) {
           return(this.response.encodeUrl(url));
       }
  -    
  -    //added for servlet api 2.2 compatibility
  -    
  -    public String encodeRedirectURL(String url) {
  -        return null;
  -    }
   
  -    public String encodeURL(String url) {
  -        return null;                        ;
  +    public void setBufferSize(int size) {
  +	this.response.setBufferSize(size);
       }
  -
  -    public void setBufferSize(int size) {}
       
       public int getBufferSize() {
  -	return 0;
  +	return(this.response.getBufferSize());
       }
       
  -    public void reset() {}
  +    public void reset() {
  +	this.response.reset();
  +    }
   
       public boolean isCommitted() {
  -	return false;
  +	return(this.response.isCommitted());
       }
   
  -    public void flushBuffer() {}
  +    public void flushBuffer() 
  +    throws IOException {
  +	this.response.flushBuffer();
  +    }
   
  -    public void setLocale(Locale locale) {}
  +    public void setLocale(Locale locale) {
  +	this.response.setLocale(locale);
  +    }
       
       public Locale getLocale() {
  -    	return null;
  +    	return(this.response.getLocale());
       }
   
  -    public void addHeader(String headername, String value) {}
  +    public void addHeader(String headername, String value) {
  +	this.response.addHeader(headername, value);
  +    }
       
  -    public void addDateHeader(String headername, long date) {}
  +    public void addDateHeader(String headername, long date) {
  +	this.response.addDateHeader(headername, date);
  +    }
   
  -    public void addIntHeader(String headername, int value) {}
  -    
  -    
  +    public void addIntHeader(String headername, int value) {
  +	this.response.addIntHeader(headername, value);
  +    }
   }
   
  
  
  

Mime
View raw message