https://bz.apache.org/bugzilla/show_bug.cgi?id=69623
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #19 from [email protected] --- (In reply to Christopher Schultz from comment #17) > This really should not require a MySQL database to test. It should be > sufficient to write a short JSP or similar that calls > getResource().getContent(). Yes, I uploaded a minimal WAR that reproduces this with no need for myself. test.jsp does what you require. It simply does <%= this.getClass().getClassLoader().getResource("dummy.mdd").getContent() %> dummy.mdd exists in the WEB-INF/lib/dummy.jar and is loaded correctly by tomcat <=9.0.27 A dummy.mdd placed in the WEB-INF/classes will also work with the latest tomcat 9. > URL.getContent() is always going to be problematic if the server doesn't > return something that is usable by URL.getContent to figure out what type of > data to return to you. The "server" here is the tomcat webapp classloader and it does work for any file extension for resources loaded from WEB-INF/classes as per this fix: https://bz.apache.org/bugzilla/show_bug.cgi?id=69623#c10 It however does not work for resources loaded from webapp JARs (WEB-INF/lib/*.jar) I will thus reopen, feel free to close again if you think that the current status (a fix for WEB-INF/classes but not for WEB-INF/lib) is ok. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
