Bug 44877 - ClassCastException due to bad TagHandlerPool name generation of two different tags
ClassCastException due to bad TagHandlerPool name generation of two different...
Status: RESOLVED FIXED
Product: Tomcat 5
Classification: Unclassified
Component: Jasper
5.5.26
PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-04-25 13:43 UTC by illod
Modified: 2008-07-30 13:16 UTC (History)
0 users



Attachments
Small Eclipse 3.3 WST project (2.65 KB, application/octet-stream)
2008-04-25 13:43 UTC, illod
Details

Note You need to log in before you can comment on or make changes to this bug.
Description illod 2008-04-25 13:43:26 UTC
Created attachment 21857 [details]
Small Eclipse 3.3 WST project

The two different tags below will have the same TagHandlerPool name in the generated JSP. This will lead to a ClassCastException when accessing the JSP at runtime.

<bug:hello_world/>

<bug:hello world="true"/>

-------------------
Top of stacktrace :

java.lang.ClassCastException: fr.illod.tomcat.bug.taglib.HelloWorldTag
	org.apache.jsp.index_jsp._jspx_meth_bug_005fhello_005f0(index_jsp.java:115)
	org.apache.jsp.index_jsp._jspService(index_jsp.java:75)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        ...

--------------

The error seems to come from the "createTagHandlerPoolName" method in org.apache.jasper.compiler.Generator.java
Comment 1 Mark Thomas 2008-04-27 10:24:34 UTC
This has been fixed in trunk and proposed for 6.0.x and 5.5.x.
Comment 2 Mark Thomas 2008-05-01 13:45:20 UTC
The patch has been applied to 6.0.x and will be included in 6.0.17 onwards.
Comment 3 Mark Thomas 2008-05-16 10:57:50 UTC
Another opps - still open for 5.5.x
Comment 4 Mark Thomas 2008-07-30 13:16:40 UTC
This has been fixed for 5.5.x and will be included in 5.5.27 onwards.