Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
2.0.9, 2.0.11
-
None
-
None
-
Struts2 , Jboss 4.05, Windows, Java 5
Description
this.getServletResponse().setContentType(document.getMimeType());
this.getServletResponse().setHeader("Content-Disposition",("attachment;filename=\"" document.getFileName()"\""));
int longitud = document.getInstance().length;
this.getServletResponse().setContentLength(longitud);
OutputStream ouputStream = this.getServletResponse().getOutputStream();
ouputStream.write(document.getInstance());
ouputStream.flush();
ouputStream.close();
it shows the following error in the log. but if it works
12:15:59,546 INFO [STDOUT] 12:15:59,546 ERROR [BasicTilesContainer] Error rendering tile
java.io.IOException: Error including path '/jspinclude/layout.jsp'. getOutputStream() has already been called for this response
at org.apache.tiles.servlet.context.ServletTilesRequestContext.include(ServletTilesRequestContext.java:214)
at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:183)
at org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
at org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:86)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:417)