costin      00/12/26 14:58:52

  Modified:    src/facade22/org/apache/tomcat/facade
                        HttpServletRequestFacade.java
                        RequestDispatcherImpl.java WebXmlReader.java
               src/facade22/org/apache/tomcat/modules/facade22
                        JspInterceptor.java
  Log:
  Changed the facade to use MessageBytes instead of Strings for 2 more
  request components.
  
  Revision  Changes    Path
  1.13      +7 -6      
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletRequestFacade.java
  
  Index: HttpServletRequestFacade.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletRequestFacade.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- HttpServletRequestFacade.java     2000/12/03 07:44:53     1.12
  +++ HttpServletRequestFacade.java     2000/12/26 22:58:50     1.13
  @@ -244,7 +244,7 @@
       }
       
       public String getPathInfo() {
  -        return request.getPathInfo();
  +        return request.pathInfo().toString();
       }
   
       public String getPathTranslated() {
  @@ -261,7 +261,7 @@
       }
       
       public String getProtocol() {
  -        return request.getProtocol();
  +        return request.protocol().toString();
       }
   
       public String getQueryString() {
  @@ -337,11 +337,12 @@
        if (! path.startsWith("/")) {
            // The original implementation returned that RD relative
            // to lookupPath, which is RequestPath + PathInfo
  -         String pI= request.getPathInfo();
  +         String pI= request.pathInfo().toString();
            if( pI == null ) 
  -             path= FileUtil.catPath( request.getServletPath(), path );
  +             path= FileUtil.catPath( request.servletPath().toString(),
  +                                     path );
            else
  -             path= FileUtil.catPath( request.getServletPath() + pI,
  +             path= FileUtil.catPath( request.servletPath().toString() + pI,
                                        path);
            if( path==null) return null;
        }
  @@ -369,7 +370,7 @@
       }
   
       public String getServletPath() {
  -        return request.getServletPath();
  +        return request.servletPath().toString();
       }
   
       /**
  
  
  
  1.8       +5 -4      
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/RequestDispatcherImpl.java
  
  Index: RequestDispatcherImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/RequestDispatcherImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- RequestDispatcherImpl.java        2000/12/20 15:25:50     1.7
  +++ RequestDispatcherImpl.java        2000/12/26 22:58:50     1.8
  @@ -285,12 +285,12 @@
        Object old_servlet_path=realRequest.
            getAttribute("javax.servlet.include.servlet_path");
        realRequest.setAttribute("javax.servlet.include.servlet_path",
  -                              subRequest.getServletPath());
  +                              subRequest.servletPath().toString());
        
        Object old_path_info=realRequest.
            getAttribute("javax.servlet.include.path_info");
        realRequest.setAttribute("javax.servlet.include.path_info",
  -                              subRequest.getPathInfo());
  +                              subRequest.pathInfo().toString());
   
        Object old_query_string=realRequest.
            getAttribute("javax.servlet.include.query_string");
  @@ -302,8 +302,9 @@
                               old_context_path + " " + old_servlet_path +
                               " " + old_path_info + " " + old_query_string);
            System.out.println("NEW: " + context.getPath() + " " + path + " "
  -                            + subRequest.getServletPath() + " " +
  -                            subRequest.getPathInfo() + " " + queryString);
  +                            + subRequest.servletPath().toString() + " " +
  +                            subRequest.pathInfo().toString() + " " +
  +                            queryString);
        }
        
        // Not explicitely stated, but we need to save the old parameters
  
  
  
  1.10      +2 -1      
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/WebXmlReader.java
  
  Index: WebXmlReader.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/WebXmlReader.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- WebXmlReader.java 2000/12/14 07:10:56     1.9
  +++ WebXmlReader.java 2000/12/26 22:58:50     1.10
  @@ -88,7 +88,8 @@
       }
       
       public void contextInit(Context ctx) throws TomcatException {
  -     if( ctx.getDebug() > 0 ) ctx.log("XmlReader - init  " + ctx.getPath() + " " + 
ctx.getDocBase() );
  +     if( debug > 0 )
  +         log("contextInit  " + ctx.getPath() + " " +ctx.getDocBase() );
        ContextManager cm=ctx.getContextManager();
        
        try {
  
  
  
  1.19      +2 -2      
jakarta-tomcat/src/facade22/org/apache/tomcat/modules/facade22/JspInterceptor.java
  
  Index: JspInterceptor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/modules/facade22/JspInterceptor.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- JspInterceptor.java       2000/12/16 18:57:39     1.18
  +++ JspInterceptor.java       2000/12/26 22:58:52     1.19
  @@ -189,7 +189,7 @@
   
        // if it's an extension mapped file, construct and map a handler
        if( "jsp".equals( wrapper.getName())) {
  -         jspFile=req.getServletPath();
  +         jspFile=req.servletPath().toString();
            // extension mapped jsp - define a new handler,
            // add the exact mapping to avoid future overhead
            handler= mapJspPage( req.getContext(), jspFile );
  @@ -688,7 +688,7 @@
        * the context rooted URI of the JSP file. 
        */
       public String getJspFile() {
  -     String sP=req.getServletPath();
  +     String sP=req.servletPath().toString();
        Context ctx=req.getContext();
        if( debug>0 ) log.log("getJspFile " +
                           sP);//   ctx.getRealPath( sP ) );
  
  
  

Reply via email to