tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 4326] - SSI servlet isVirtualWebappRelative parameter does not work
Date Wed, 19 Jun 2002 12:18:20 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4326>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4326

SSI servlet isVirtualWebappRelative parameter does not work

pavel@mxfs.co.uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pavel@mxfs.co.uk
           Severity|Major                       |Critical
             Status|RESOLVED                    |REOPENED
           Priority|Other                       |High
           Platform|Sun                         |PC
         Resolution|FIXED                       |
            Version|4.0 Final                   |4.0.3 Final



------- Additional Comments From pavel@mxfs.co.uk  2002-06-19 12:18 -------
Absolutely the same bug re-appears in a TomCat version 4.0.3.

To fix the bug you need to extract 

    org/apache/catalina/util/ssi/SsiMediator.java

from 

    ${catalina.home}/server/lib/servlets-ssi.jar 
                            (a.k.a. servlets-ssi.renametojar)


Then, locate 'protected String getVirtualPath(String path)' method.

Near the end of the method there is a code block :

        .......
             } else if (normalized != null){
                // find which context is the right one to handle
                String context = normalized.substring(0, path.indexOf('/', 
1));
                ServletContext sc = servletContext.getContext(context);

                if (sc!=null) {
                    servletContext = sc;
                    normalized = normalized.substring(context.length());
                }

              }
        ........

Change it to:

             } else if (normalized != null){
                // find which context is the right one to handle
                String context = normalized.substring(0, path.indexOf('/', 
1));
                // **** NEXT LINE PROVIDES A FIX : ****
               ServletContext sc = origServletContext.getContext(context);

                if (sc!=null) {
                    servletContext = sc;
                    normalized = normalized.substring(context.length());
                }

              }
        ........


Compile, ra-pack and restart. All's done.

When I can expect the fix to be introduced as a part of new release?

Cheers,

Pavel

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


Mime
View raw message