DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24586>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24586 Compilation error when exposing an Inner class Summary: Compilation error when exposing an Inner class Product: Tomcat 4 Version: 4.1.27 Platform: PC OS/Version: Windows XP Status: NEW Severity: Normal Priority: Other Component: Jasper AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] If a JSP tag attempts to expose an inner class, the following error results: ==================================================================== An error occurred at line: 3 in the jsp file: /TestTag.jsp Generated servlet error: D:\dev\jakarta-tomcat-4.1.27 \work\Standalone\localhost\InnerBeanTest\TestTag_jsp.java:63: cannot resolve symbol symbol : class FooTag$InnerBean location: package test perchance you meant 'FooTag.InnerBean' exposedBean = (test.FooTag$InnerBean) pageContext.findAttribute ("exposedBean"); ^ 2 errors at org.apache.jasper.compiler.DefaultErrorHandler.javacError (DefaultErrorHandler.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError (ErrorDispatcher.java:293) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile (JspCompilationContext.java:473) at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain ==================================================================== You can use the following examples to generate the error: ==================================================================== package test; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.TagSupport; public class FooTag extends TagSupport { public static class InnerBean { public InnerBean() { super(); } } public int doStartTag() throws JspException { super.doStartTag(); InnerBean innerBean = new InnerBean(); pageContext.setAttribute(getId(), innerBean); return SKIP_BODY; } } ==================================================================== package test; import javax.servlet.jsp.tagext.TagData; import javax.servlet.jsp.tagext.TagExtraInfo; import javax.servlet.jsp.tagext.VariableInfo; import test.FooTag; public class FooTei extends TagExtraInfo { private static final Class type = FooTag.InnerBean.class; public VariableInfo[] getVariableInfo(TagData data) { VariableInfo typeInfo = new VariableInfo(data.getId (),type.getName(),true,VariableInfo.AT_END); return new VariableInfo[] { typeInfo }; } } ==================================================================== <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> <taglib> <tlib-version>1.0</tlib-version> <jsp-version>1.2</jsp-version> <short-name>test</short-name> <uri></uri> <tag> <name>fooTag</name> <tag-class>test.FooTag</tag-class> <tei-class>test.FooTei</tei-class> <body-content>JSP</body-content> <description> </description> <attribute> <name>id</name> <required>true</required> <description></description> </attribute> </tag> </taglib> ==================================================================== <[EMAIL PROTECTED] contentType="text/html; charset=utf-8"%> <%@ taglib prefix="ibc" uri="http://InnerBeanClass.net" %> <ibc:fooTag id="exposedBean"/> <%=exposedBean%> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]