tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12432] New: - Can't compile JSP with nested custom tags that have VariableInfo
Date Mon, 09 Sep 2002 12:35:53 GMT
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=12432>.
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=12432

Can't compile JSP with nested custom tags that have VariableInfo

           Summary: Can't compile JSP with nested custom tags that have
                    VariableInfo
           Product: Tomcat 4
           Version: 4.1.10
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Jasper 2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: takehiko.yokota@toshiba.co.jp


In the case that JSP file has netsed custom tags which use a variable,
Jasper can't compile a Java file corresponging to the JSP file.

For example, JSP file as follows causes an error:
--JSP FILE START--
<%@ page contentType="text/html" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<custom:test var="a">
  <custom:test var="b">
    test
  </custom:test>
</custom:test>
--JSP FILE END--

<custom:test> tag uses a variable named by attribute 'var'. TagExtraInfo
for <custom:test> has an entry for the variable. The above case, the outer
<custom:test> tag has a variable named as "a" and the inner <custom:test>
tag has a variable named as "b".

When Jasper compiles this JSP file, it outputs an 'undefined symbol' error.

The error location of Compiled Java code is as follows:
--JAVA CODE START--
      /* ----  custom:test ---- */
      ...(snip)...
          a = (java.lang.String) pageContext.findAttribute("a");
        }
        do {
          out.write("\n  ");
          /* ----  custom:test ---- */
          java.lang.String _jspx_b_1 = b; <-----!! HERE IS THE ERROR POINT!!
          test.Test _jspx_th_custom_test_1 = (test.Test) _jspx_tagPool_custom_te
st_var.get(test.Test.class);
          _jspx_th_custom_test_1.setPageContext(pageContext);
          _jspx_th_custom_test_1.setParent(_jspx_th_custom_test_0);
          _jspx_th_custom_test_1.setVar("b");
          ...(snip)...
--JAVA CODE END--

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message