You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/07/12 20:16:08 UTC

[Bug 53541] New: Bug in virtual webapp feature. Custom tags badly supported.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53541

          Priority: P2
            Bug ID: 53541
          Assignee: dev@tomcat.apache.org
           Summary: Bug in virtual webapp feature. Custom tags badly
                    supported.
          Severity: major
    Classification: Unclassified
          Reporter: philipzuev@gmail.com
          Hardware: PC
            Status: NEW
           Version: 7.0.28
         Component: Catalina
           Product: Tomcat 7

Defect report - briefly:
Tomcat implements “virtual webapp” feature. For details, see
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Virtual_webapp
Tomcat 7.0.28 implementation of “virtual webapp” has a defect – it does not
allow developer to use tag library from WEB-INF/lib/*.jar. For example,
developer can’t put well known jstl-1.2.jar into WEB-INF/lib/ and use it.

Defect report – detailed:
Proof of concept web application -
lite-filter-mdot-1.0.0-BUILD-SNAPSHOT-sources.jar. Really, it’s a sample web
app downloaded from Spring Source.  You can download it from
https://github.com/SpringSource/spring-mobile-samples. I just changed POM a
little bit to remove redundant samples.

Error screenshot – error.png

Zipped tomcat CONF directory – defect-conf.zip
======From Spring.xml========
<Context path="/spring"
docBase="C:/Users/Filipp_Zuev/workspace/lite-filter-mdot/src/main/webapp" >
  <Resources className="org.apache.naming.resources.VirtualDirContext"
    extraResourcePaths=
     
"/WEB-INF/classes=C:/Users/Filipp_Zuev/workspace/lite-filter-mdot/target/classes,/WEB-INF/lib=C:/Users/Filipp_Zuev/workspace/lite-filter-mdot/target/lite-filter-mdot-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib"
/>
  <Loader className="org.apache.catalina.loader.VirtualWebappLoader"
   
virtualClasspath="C:/Users/Filipp_Zuev/workspace/lite-filter-mdot/target/classes;
     
C:/Users/Filipp_Zuev/workspace/lite-filter-mdot/target/lite-filter-mdot-1.0.0-BUILD-SNAPSHOT/WEB-INF/lib/*.jar"
/>
  <JarScanner scanAllDirectories="true" />
</Context>
=============
Tomcat log file - catalina.2012-07-12.log

Defect–fix suggested:
Add this method to org.apache.naming.resources.VirtualDirContext
@Override
    protected String doGetRealPath(String path) {
        File file = file(path);
        if(null!=file){
            return file.getAbsolutePath();
        }else{
            return null;
        }
    }

Defect–fix suggested-proof of concept:
1.    Deploy attached tomcat-extension-0.0.1-SNAPSHOT.jar with
me.tomcat.bugfix.workaround.VirtualDirContext.class into Tomcat’s common lib
directory.
2.    In the Context configuration for the proof of concept application replace
org.apache.naming.resources.VirtualDirContext for
me.tomcat.bugfix.workaround.VirtualDirContext
3.    Restart tomcat. 
Defect fixed!

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53541] Bug in virtual webapp feature. Custom tags badly supported.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53541

Philip <ph...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |philipzuev@gmail.com
                 OS|                            |All

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 53541] Bug in virtual webapp feature. Custom tags badly supported. Error is "org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53541

Philip <ph...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://docs.google.com/ope
                   |                            |n?id=0B1YRF9AZ53VhSlJaRkY5d
                   |                            |S1aZW8

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 53541] Bug in virtual webapp feature. Custom tags badly supported.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53541

--- Comment #1 from Philip <ph...@gmail.com> ---
All configs, sources, logs mentioned in the defect report, can be downloaded
here - https://docs.google.com/open?id=0B1YRF9AZ53VhSlJaRkY5dS1aZW8

P.S.
Bugzilla limited me to 1kb per attachement, it's very unuseful.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 53541] Bug in virtual webapp feature. Custom tags badly supported. Error is "org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53541

--- Comment #4 from Philip <ph...@gmail.com> ---
(In reply to comment #3)
> This has been fixed in trunk and 7.0.x and will be included in 7.0.30
> onwards.
> 
> Regarding the test case, it would have been a lot easier to work with if
> necessary files to recreate this were provided in a zip/tar.gz that matched
> the necessary file structure. A lot of reverse engineering was required to
> recreate the test case before the bug could be investigated.
Thank you for your response, Mark.
It's my pleasure to help you improve Tomcat!
Sorry, if test case was non convenient. Next time it will be better.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 53541] Bug in virtual webapp feature. Custom tags badly supported. Error is "org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53541

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
For the record, the maximum permitted attachment size is 1MB, not 1KB. 1MB
should be more than enough for any test case - even one packaged as a WAR -
providing it meets the standard of "the minimum necessary to demonstrate the
bug".

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 53541] Bug in virtual webapp feature. Custom tags badly supported. Error is "org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53541

Philip <ph...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Bug in virtual webapp       |Bug in virtual webapp
                   |feature. Custom tags badly  |feature. Custom tags badly
                   |supported.                  |supported. Error is
                   |                            |"org.apache.jasper.JasperEx
                   |                            |ception: The absolute uri:
                   |                            |http://java.sun.com/jsp/jst
                   |                            |l/core cannot be resolved
                   |                            |in either web.xml or the
                   |                            |jar files deployed with
                   |                            |this application"

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 53541] Bug in virtual webapp feature. Custom tags badly supported. Error is "org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53541

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Mark Thomas <ma...@apache.org> ---
This has been fixed in trunk and 7.0.x and will be included in 7.0.30 onwards.

Regarding the test case, it would have been a lot easier to work with if
necessary files to recreate this were provided in a zip/tar.gz that matched the
necessary file structure. A lot of reverse engineering was required to recreate
the test case before the bug could be investigated.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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