Bug 54964 - Class loading issue of "TagPlugin" in TagPluginManager
Summary: Class loading issue of "TagPlugin" in TagPluginManager
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 7.0.40
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2013-05-14 06:57 UTC by Sheldon Shao
Modified: 2013-05-28 11:58 UTC (History)
0 users

Patch for TagPluginManager.java (721 bytes, patch)
2013-05-14 06:57 UTC, Sheldon Shao
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sheldon Shao 2013-05-14 06:57:34 UTC
Created attachment 30281 [details]
Patch for TagPluginManager.java

TagPluginManager is using "Class.forName" to load extensions of TagPlugin.
It can't work when these extensions are put under the WEB-INF/lib.

Here is the code,

            String pluginClassStr = pluginClassNode.getBody();
            TagPlugin tagPlugin = null;
            try {
                Class<?> pluginClass = Class.forName(pluginClassStr);
                tagPlugin = (TagPlugin) pluginClass.newInstance();
            } catch (Exception e) {
                throw new JasperException(e);
Comment 1 Mark Thomas 2013-05-28 11:58:16 UTC
Thanks for the report and the patch. It has been applied to 7.0.x and will be included in 7.0.41 onwards.