public static void generateLocalVariables(JavaCodeWriter out, Element jspElement, String pageContextVar) throws JspCoreException {
        if (hasUseBean(jspElement)) {
            out.println("HttpSession session = "+pageContextVar+".getSession();");
            out.println("ServletContext application = "+pageContextVar+".getServletContext();");
        }
        if (hasUseBean(jspElement) || hasIncludeAction(jspElement) || hasSetProperty(jspElement) || hasForwardAction(jspElement)) {
            out.println("HttpServletRequest request = (HttpServletRequest)"+pageContextVar+".getRequest();");
        }
        if (hasIncludeAction(jspElement)) {
            out.println("HttpServletResponse response = (HttpServletResponse)"+pageContextVar+".getResponse();");
        }
    }
public static void generateLocalVariables ( JavaCodeWriter out , Element jspElement , String pageContextVar ) throws JspCoreException { if ( hasUseBean ( jspElement ) ) { out . println ( "HttpSession session = " + pageContextVar + ".getSession();" ) ; out . println ( "ServletContext application = " + pageContextVar + ".getServletContext();" ) ; } if ( hasUseBean ( jspElement ) || hasIncludeAction ( jspElement ) || hasSetProperty ( jspElement ) || hasForwardAction ( jspElement ) ) { out . println ( "HttpServletRequest request = (HttpServletRequest)" + pageContextVar + ".getRequest();" ) ; } if ( hasIncludeAction ( jspElement ) ) { out . println ( "HttpServletResponse response = (HttpServletResponse)" + pageContextVar + ".getResponse();" ) ; } }
PK65013 - already know if this isTagFile or not and pageContextVar is set accordingly