This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 236991 - JSP parser can't find tagPlugins classes
Summary: JSP parser can't find tagPlugins classes
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP Parser (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: issues@javaee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-10 14:04 UTC by PavelCibulka
Modified: 2016-07-07 08:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description PavelCibulka 2013-10-10 14:04:35 UTC
This is NetBeans JSP parser problem. Project will run fine. Netbeans display ClassNotFoundException, if custom tag plugins are used for JSP compilation (WEB-INF/tagPlugins.xml). If Glassfish tag plugins are used, NetBeans works fine.

How to reproduce:
1. Create new web project.
2. Add tomcat-jasper library (or other library with tag plugin class).
3. Add tagPlugins.xml file into WEB-INF:
<?xml version="1.0"?>
<tag-plugins>
    <tag-plugin>
        <tag-class>org.apache.taglibs.standard.tag.rt.core.IfTag</tag-class>
        <plugin-class>org.apache.jasper.tagplugins.jstl.core.If</plugin-class>
    </tag-plugin>
</tag-plugins>
4. Open jsp file.

You will get error:
java.lang.ClassNotFoundException: org.apache.jasper.tagplugins.jstl.core.If

It seems like jsp parser, which is based on Glassfish, doesn't use project libraries.
Comment 1 PavelCibulka 2014-03-20 09:32:10 UTC
I have done some more research today. Still present in 8.0. This can be fixed.

Suggested fix:
In org.apache.jasper.compiler.TagPluginManager class package glassfish-jsp-parser-4.0.

change:
Class.forName(pluginClassStr).asSubclass(TagPlugin.class);

to:
ctxt.getClassLoader().loadClass(pluginClassStr).asSubclass(TagPlugin.class);



More info:
This change enable usage of tag plugins extensions from project. This should be fixed in Glassfish javax.servlet.jsp package too. Similar problem has been solved in tomcat 7.0.42 https://issues.apache.org/bugzilla/show_bug.cgi?id=54964.
Comment 2 Martin Balin 2016-07-07 08:52:58 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss