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

Unable to pass Request Time Parameters for the XML View of JSP file

           Summary: Unable to pass Request Time Parameters for the XML View
                    of JSP file
           Product: Tomcat 4
           Version: 4.0 Final
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Unknown
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I have the following jsp:

<?xml version="1.0" encoding="utf-8"?>
<jsp:root xmlns:jsp="http://java.sun.com/products/jsp/dtd/jsp_1_0.dtd";>
        <jsp:directive.page language="java"/>
        <html>
                <head>
                        <title>Hello</title>
                </head>
                <jsp:scriptlet>
                String bgcolor = "red";
                </jsp:scriptlet>
                <body bgcolor="%=bgcolor%"/>
        </html>
</jsp:root>

The generated java file is (the wrong place marked by '!!!!!!!'):

package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class hello$jsp extends HttpJspBase {


    static {
    }
    public hello$jsp( ) {
    }

    private static boolean _jspx_inited = false;

    public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
    }

    public void _jspService(HttpServletRequest request, HttpServletResponse  
response)
        throws java.io.IOException, ServletException {

        JspFactory _jspxFactory = null;
        PageContext pageContext = null;
        HttpSession session = null;
        ServletContext application = null;
        ServletConfig config = null;
        JspWriter out = null;
        Object page = this;
        String  _value = null;
        try {

            if (_jspx_inited == false) {
                synchronized (this) {
                    if (_jspx_inited == false) {
                        _jspx_init();
                        _jspx_inited = true;
                    }
                }
            }
            _jspxFactory = JspFactory.getDefaultFactory();
            response.setContentType("text/html;charset=ISO-8859-1");
            pageContext = _jspxFactory.getPageContext(this, request, response,
                        "", true, 8192, true);

            application = pageContext.getServletContext();
            config = pageContext.getServletConfig();
            session = pageContext.getSession();
            out = pageContext.getOut();

            // begin [file="/hello.jsp";from=(5,8);to=(5,8)]
                out.write("<html >");
            // end
            // HTML // begin [file="/hello.jsp";from=(5,8);to=(6,9)]
                out.write("\r\n\t\t");

            // end
            // begin [file="/hello.jsp";from=(6,9);to=(6,9)]
                out.write("<head >");
            // end
            // HTML // begin [file="/hello.jsp";from=(6,9);to=(7,11)]
                out.write("\r\n\t\t\t");

            // end
            // begin [file="/hello.jsp";from=(7,11);to=(7,11)]
                out.write("<title >");
            // end
            // HTML // begin [file="/hello.jsp";from=(7,24);to=(7,24)]
                out.write("Hello");

            // end
            // begin [file="/hello.jsp";from=(7,24);to=(7,24)]
                out.write("</title>");
            // end
            // HTML // begin [file="/hello.jsp";from=(8,10);to=(8,10)]
                out.write("\r\n\t\t");

            // end
            // begin [file="/hello.jsp";from=(8,10);to=(8,10)]
                out.write("</head>");
            // end
            // begin [file="/hello.jsp";from=(9,18);to=(11,19)]
                
                                String bgcolor = "red";
                                
            // end
            // HTML // begin [file="/hello.jsp";from=(5,8);to=(12,30)]
                out.write("\r\n\t\t\r\n\t\t");

            // end
            // begin [file="/hello.jsp";from=(12,30);to=(12,30)]
!!!!!!!                out.write("<body   bgcolor=\"%=bgcolor%\">");
            // end
            // HTML // begin [file="/hello.jsp";from=(13,10);to=(13,10)]
                out.write("\r\n\t\t");

            // end
            // begin [file="/hello.jsp";from=(13,10);to=(13,10)]
                out.write("</body>");
            // end
            // HTML // begin [file="/hello.jsp";from=(14,9);to=(14,9)]
                out.write("\r\n\t");

            // end
            // begin [file="/hello.jsp";from=(14,9);to=(14,9)]
                out.write("</html>");
            // end

        } catch (Throwable t) {
            if (out != null && out.getBufferSize() != 0)
                out.clearBuffer();
            if (pageContext != null) pageContext.handlePageException(t);
        } finally {
            if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
        }
    }
}

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

Reply via email to