在 Java Web 应用程序中,我使用 Jboss 4.2.3 上的 Stripes 框架。在我使用的 JSP 中
<c:import url="http://localhost:8080/contextPath/txts/someID" charEncoding="UTF-8"/>
它工作得很好,内容包含在输出 HTML 中。但是,这不起作用
<c:import url="/txts/someID" charEncoding="UTF-8"/>
它会引发此错误(整个堆栈太大而无法粘贴到此处,因此我将前几行包括在内):
java.lang.IllegalStateException: Unexpected internal error during <import>: Target servlet called getOutputStream(), then getWriter()
at org.apache.taglibs.standard.tag.common.core.ImportSupport$ImportResponseWrapper.getOutputStream(ImportSupport.java:492)
at net.sourceforge.stripes.action.StreamingResolution.stream(StreamingResolution.java:443)
at net.sourceforge.stripes.action.StreamingResolution.execute(StreamingResolution.java:240)
at net.sourceforge.stripes.controller.DispatcherHelper$7.intercept(DispatcherHelper.java:508)
at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)
at org.stripesstuff.plugin.security.SecurityInterceptor.interceptResolutionExecution(SecurityInterceptor.java:225)
at org.stripesstuff.plugin.security.SecurityInterceptor.intercept(SecurityInterceptor.java:129)
at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
at net.sourceforge.stripes.controller.HttpCacheInterceptor.intercept(HttpCacheInterceptor.java:99)
at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
at net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)
at net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
at net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)
at net.sourceforge.stripes.controller.DispatcherHelper.executeResolution(DispatcherHelper.java:502)
at net.sourceforge.stripes.controller.DispatcherServlet.executeResolution(DispatcherServlet.java:286)
at net.sourceforge.stripes.controller.DispatcherServlet.service(DispatcherServlet.java:170)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
任何意见,将不胜感激。
问候