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=41824>. 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=41824 Summary: Unable to use nested type in TLD Product: Tomcat 5 Version: 5.5.20 Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: Jasper AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] I wish to pass instances of a nested type to a JSP tag. My nested type is edu.ucsf.library.ltdl2.history.SearchHistory.Item (static inner class). I wrote my TLD like so: <tag> ... <attribute> <name>historyItem</name> <required>no</required> <rtexprvalue>true</rtexprvalue> <type>edu.ucsf.library.ltdl2.history.SearchHistory.Item</type> </attribute> </tag> Tomcat (Jasper) 5.5.20 then fails with: org.apache.jasper.JasperException: /WEB-INF/jsp/history/view.jsp(88,14) Unknown attribute type (edu.ucsf.library.ltdl2.history.SearchHistory.Item) for attribute historyItem. at org.apache.jasper.compiler.DefaultErrorHandler.jspError (DefaultErrorHandler.java:39) at org.apache.jasper.compiler.ErrorDispatcher.dispatch (ErrorDispatcher.java:405) at org.apache.jasper.compiler.ErrorDispatcher.jspError (ErrorDispatcher.java:234) at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes (Validator.java:946) at org.apache.jasper.compiler.Validator$ValidateVisitor.visit (Validator.java:710) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213) at org.apache.jasper.compiler.Validator$ValidateVisitor.visit (Validator.java:730) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213) at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219) at org.apache.jasper.compiler.Node$Root.accept(Node.java:456) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163) at org.apache.jasper.compiler.Validator.validate(Validator.java:1489) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:166) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264) at org.apache.jasper.JspCompilationContext.compile (JspCompilationContext.java:563) at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:305) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) If I use the name "edu.ucsf.library.ltdl2.history.SearchHistory$Item" instead, I get: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 88 in the jsp file: /WEB-INF/jsp/history/view.jsp Generated servlet error: The nested type edu.ucsf.library.ltdl2.history.SearchHistory$Item cannot be referenced using its binary name An error occurred at line: 88 in the jsp file: /WEB-INF/jsp/history/view.jsp Generated servlet error: The nested type edu.ucsf.library.ltdl2.history.SearchHistory$Item cannot be referenced using its binary name at org.apache.jasper.compiler.DefaultErrorHandler.javacError (DefaultErrorHandler.java:84) at org.apache.jasper.compiler.ErrorDispatcher.javacError (ErrorDispatcher.java:328) at org.apache.jasper.compiler.JDTCompiler.generateClass (JDTCompiler.java:414) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:297) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264) at org.apache.jasper.JspCompilationContext.compile (JspCompilationContext.java:563) at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:305) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) This appears to be related to bug 35351, where the nested type is used in <jsp:useBean> constructs. Thanks for your help. -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]