Mantis - Resin
Viewing Issue Advanced Details
3699 minor always 09-28-09 09:55 10-30-09 18:36
daniel_larsson  
 
normal  
closed 3.0.28  
fixed  
none    
none 4.0.2  
0003699: Faulty code generated for JSP pages under some circumstances
I'm not sure how to minimally produce this, but I have a tagfile using a custom taglib, and I'm getting java compile errors in the generated java code. The problem is similar to the one reported in bug 0001037.

The problem is the generated code includes a reference to "_jspBody", which is a private member, and not accessible by the generated class.

In the source modules/resin/src/com/caucho/jsp/java/JspNode.java, generateFragment contains the code:

    if (_gen instanceof JavaTagGenerator) {
      JavaTagGenerator tagGen = (JavaTagGenerator) _gen;
      
      if (tagGen.isStaticDoTag()) // jsp/1025
    cb.append(", _jspBody");
      else
    cb.append(", getJspBody()");
    }
    else
      cb.append(", null");

but modules/resin/src/com/caucho/jsp/java/JspFragmentNode.java, generateValue says:

    if (_gen instanceof JavaTagGenerator)
      cb.append(", _jspBody");
    else
      cb.append(", null");

Changing the latter into the former fixes the problem.

This problem seems to be present in 3.0.28, 3.1.9 and 4.0.1

Notes
(0004275)
alex   
10-30-09 18:36   
jsp/100g.qa