I think the problem is that your trying to initialize a value to a variable
called page which is a JSP keyword.  Hope that helps.

Mark


                -----Original Message-----
                From:   Jim Huffsmith [mailto:[EMAIL PROTECTED]]
                Sent:   Friday, August 25, 2000 11:55 AM
                To:     [EMAIL PROTECTED]
                Subject:        jsp:include error

                Hi, all

                I'm getting an error with jsp:include if I set the page
equal to an
                expression. Does anybody have a suggestion? It works fine if
I hard-code the
                page name. My code:

                <%! String str = "test";
                        String page = "t1.jsp";
                %>
                <jsp:include page="<%= page %>" flush="true">
                        <jsp:param name="paramA" value="<%= str %>" />
                </jsp:include>


                Error message:

                java.lang.IllegalStateException: Response has already been
committed
                        at

org.apache.tomcat.core.HttpServletResponseFacade.sendError(HttpServletRespon
                seFacade.java:157)
                        at

org.apache.tomcat.servlets.DefaultServlet.serveFile(DefaultServlet.java:325)
                        at

org.apache.tomcat.servlets.DefaultServlet.doGet(DefaultServlet.java:218)
                        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
                        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                        at

org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
                Compiled Code)
                        at

org.apache.tomcat.core.RequestDispatcherImpl.include(RequestDispatcherImpl.j
                ava:262)
                        at

org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:350)
                        at

jsppoc.jsp.cgi_0002dbin._0002fjsppoc_0002fjsp_0002fcgi_0002dbin_0002ft_0002e

jspt_jsp_40._jspService(_0002fjsppoc_0002fjsp_0002fcgi_0002dbin_0002ft_0002e
                jspt_jsp_40.java:69)
                        at

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
                        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                        at

org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
                va:174)
                        at

org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
                        at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java,
                Compiled Code)
                        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                        at

org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
                Compiled Code)
                        at

org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
                        at

org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
                onnectionHandler.java, Compiled Code)
                        at

org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java,
                Compiled Code)
                        at java.lang.Thread.run(Thread.java:479)

                Any ideas?

                Jim


===========================================================================
                To unsubscribe: mailto [EMAIL PROTECTED] with body:
"signoff JSP-INTEREST".
                Some relevant FAQs on JSP/Servlets can be found at:

                 http://java.sun.com/products/jsp/faq.html
                 http://www.esperanto.org.nz/jsp/jspfaq.html
                 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
                 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to