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=12517>.
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=12517

JSP compilation error with nested scripting variable





------- Additional Comments From [EMAIL PROTECTED]  2002-09-11 18:04 -------
I had the same problem with the new 4.1.10 release.

Our custom tag simply implements 'Tag' interface and returns 'EVAL_BODY_INCLUDE'
in doStartTag(). The tag exports 'menuString' as following:

public VariableInfo [] getVariableInfo(TagData pData) {
        return new VariableInfo[] {
            new VariableInfo("menuString",
                             "java.lang.String",
                             true,
                             VariableInfo.NESTED)
                };
    }

Compiled java code for jsp page when two 'menu' tags are used in different 
blocks (which means different { } blocks)

/* ----  ct:menu ---- (first one) */
      {
        java.lang.String menuString = null;
        com.ct.tags.ui.MenuTag _jspx_th_ct_menu_0 =
(com.ct.tags.ui.MenuTag)
_jspx_tagPool_ct_menu_whichMenu.get(com.ct.tags.ui.MenuTag.class);
        _jspx_th_ct_menu_0.setPageContext(pageContext);
        _jspx_th_ct_menu_0.setParent(null);
        _jspx_th_ct_menu_0.setWhichMenu("global");
        int _jspx_eval_ct_menu_0 = _jspx_th_ct_menu_0.doStartTag();
        menuString = (java.lang.String)
pageContext.findAttribute("menuString");
        if (_jspx_eval_ct_menu_0 !=
javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
          out.print( menuString );
        }
        if (_jspx_th_ct_menu_0.doEndTag() ==
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
          return;
        _jspx_tagPool_ct_menu_whichMenu.reuse(_jspx_th_ct_menu_0);
      }


/* ----  ct:menu ---- (second one) */
      com.ct.tags.ui.MenuTag _jspx_th_ct_menu_1 = (com.ct.tags.ui.MenuTag)
_jspx_tagPool_ct_menu_whichMenu.get(com.ct.tags.ui.MenuTag.class);
      _jspx_th_ct_menu_1.setPageContext(pageContext);
      _jspx_th_ct_menu_1.setParent(null);
      _jspx_th_ct_menu_1.setWhichMenu("top");
      int _jspx_eval_ct_menu_1 = _jspx_th_ct_menu_1.doStartTag();
      menuString = (java.lang.String)
pageContext.findAttribute("menuString");
      if (_jspx_eval_ct_menu_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY)
{
        out.print( menuString );
      }


java error msg:

Generated servlet error:
/home/xliu/Apache/jakarta-tomcat-4.1.10-
src/build/work/Standalone/localhost/cmbs/custom_ui_elements/inc_gnav_jsp.java:15
5:
cannot resolve symbol
symbol  : variable menuString
location: class org.apache.jsp.inc_gnav_jsp
        out.print( menuString );

********************************************************************************
Observations:

. this tag works on 4.1.9 release and 4.0.2 production.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to