我正在使用Spring 3.0.5 我从标签中调用控制器:
<jsp:include page="/getPageHeader">
<jsp:param name="locator" value="" />
</jsp:include>
我需要这样做因为我想根据requestParam更改当前页面的头jsp页面。
/getPageHeader
控制器检查请求URI并为页面选择适当的标题。
但是这件事给了我错误:
Jun 28, 2011 2:01:52 PM org.apache.catalina.core.ApplicationContext log
INFO: PageContextImpl.release(): Internal error flushing buffer
Jun 28, 2011 2:01:52 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.io.IOException: Stream closed
at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:204)
at org.apache.jasper.runtime.JspWriterImpl.clearBuffer(JspWriterImpl.java:160)
at org.apache.jsp.WEB.includes.ourpartner_jsp._jspService(ourpartner_jsp.java:209)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:257)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)
我认为这是因为Spring控制器返回已经格式化的标头jsp页面。 有没有更好的方法来做到这一点。或任何方法来解决它。
还有一件事:
当我在使用jsp:include
的页面上使用磁贴时,它工作正常。但是当我在anchor<a>
标签中调用该页面时,它会向我显示该错误(我已经过去了)。
任何帮助都会很明显 谢谢和问候