Hi all, I'm a newbie of JSP programming... I've a great problem (but for you surely is a little thing)...


I get an error on the last version of Tomcat with my webapp (weird but with the older 5.4 it runs perfectly...)

this line in my index.jsp is the source of the error:

<jsp:include page='<%= "database/"+dbn+"/db_rec.xml" %>' />

if the file exists I get the error...

I've used another include just before this one:
<jsp:include page='<%= "database/"+dbn+"/htmlform.jsp" %>' />

this works, but the second one (mentioned before) give this error:
HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.IllegalStateException
org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:62)
org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:783)
org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:348)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:307)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.
Apache Tomcat/5.5.12

Think of what you're trying to do...
The jsp:include tag includes the result of running a JSP through the JSP engine at runtime.
You're trying to pull an XML file through the JSP engine, it won't be able to handle that very well.

This article has been dead for over six months. Start a new discussion instead.