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: philipz...@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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org