You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2007/07/26 21:29:50 UTC
DO NOT REPLY [Bug 42983] New: - Creating a custom tag with an attribute named "class" causes exception
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42983>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42983
Summary: Creating a custom tag with an attribute named "class"
causes exception
Product: Tomcat 5
Version: 5.5.23
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P2
Component: Servlet & JSP API
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: jorge.williams@inl.gov
I'm developing a tag library. The tag library is written to the 1.2 spec as it
should work in both JSP 1.2 and JSP 2.0 platforms. Under Tomcat 5.5.23 I get an
exception when trying to set a string attribute named "class". The exception
suggests that a setter method cannot be found, but I'm sure that the setter
method is available especially since when I deploy the same application under
WebLogic 9 it works fine. I wasn't able to find anything in the JSP 1.2 spec
that says that "class" is a reserved attribute so I'm not sure what the problem
is. I've noticed the same problem under several versions of Tomcat 4.
EXCEPTION FOLLOWS:
org.apache.jasper.JasperException: /index.jsp(27,31) Unable to find setter
method for attribute: class
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2722)
org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:2875)
org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2188)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1686)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1442)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2164)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2214)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1706)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1442)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2164)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2214)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2225)
org.apache.jasper.compiler.Node$JspRoot.accept(Node.java:526)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2164)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2214)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2220)
org.apache.jasper.compiler.Node$Root.accept(Node.java:457)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2164)
org.apache.jasper.compiler.Generator.generate(Generator.java:3322)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 42983] - Creating a custom tag with an attribute named "class" causes exception
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42983>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42983
asf-bugzilla@richardfearn.co.uk changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
------- Additional Comments From asf-bugzilla@richardfearn.co.uk 2007-08-16 04:36 -------
Every Java object has a getClass method, which returns a Class object that
indicates the object's type. Your getClass and/or setClass methods are
conflicting with the 'standard' getClass method.
Basically the introspector is seeing the standard getClass first, and sees
there's no matching setClass that takes a Class object. It therefore treats
class as a read-only property, hence the "Unable to find setter method" error.
You do have a setClass method, it's just that it doesn't take a Class parameter.
I imagine that on WebLogic, the introspection sees your setClass method first
and therefore treats "class" as a writable property.
To avoid this kind of problem, you should change your property name to "className".
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 42983] - Creating a custom tag with an attribute named "class" causes exception
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42983>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42983
------- Additional Comments From jorge.williams@inl.gov 2007-07-26 12:32 -------
I should note that I've tried redeploying the application several times as well
as starting and stopping the server before redeploying the problem still persists.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 42983] - Creating a custom tag with an attribute named "class" causes exception
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42983>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42983
asf-bugzilla@richardfearn.co.uk changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |asf-
| |bugzilla@richardfearn.co.uk
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org