You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "RAUL (JIRA)" <ji...@apache.org> on 2008/01/04 18:22:04 UTC
[jira] Created: (WW-2406) Error
Error
------
Key: WW-2406
URL: https://issues.apache.org/struts/browse/WW-2406
Project: Struts 2
Issue Type: Bug
Components: Core Actions, Integration, Plugin - Tiles
Affects Versions: 2.0.11, 2.0.9
Environment: Struts2 , Jboss 4.05, Windows, Java 5
Reporter: RAUL
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)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2406) Error
Posted by "RAUL (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42945#action_42945 ]
RAUL commented on WW-2406:
--------------------------
thank you, already solve the problem
> Error
> ------
>
> Key: WW-2406
> URL: https://issues.apache.org/struts/browse/WW-2406
> Project: Struts 2
> Issue Type: Bug
> Components: Core Actions, Integration, Plugin - Tiles
> Affects Versions: 2.0.9, 2.0.11
> Environment: Struts2 , Jboss 4.05, Windows, Java 5
> Reporter: RAUL
>
> 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)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-2406) Error
Posted by "Dave Newton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42944#action_42944 ]
Dave Newton commented on WW-2406:
---------------------------------
(1) If it works, then it can't be a major bug.
(2) Depending on how you've set up your action and mapping, it's probable it isn't a bug anyway, if your action is inside a tile and attempting to return something other than JSP, which it is.
If you write to the response stream after something called getOutputStream this is what happens.
> Error
> ------
>
> Key: WW-2406
> URL: https://issues.apache.org/struts/browse/WW-2406
> Project: Struts 2
> Issue Type: Bug
> Components: Core Actions, Integration, Plugin - Tiles
> Affects Versions: 2.0.9, 2.0.11
> Environment: Struts2 , Jboss 4.05, Windows, Java 5
> Reporter: RAUL
>
> 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)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (WW-2406) Error
Posted by "Dave Newton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Newton closed WW-2406.
---------------------------
Resolution: Not A Problem
Closed as per reporter comment.
> Error
> ------
>
> Key: WW-2406
> URL: https://issues.apache.org/struts/browse/WW-2406
> Project: Struts 2
> Issue Type: Bug
> Components: Core Actions, Integration, Plugin - Tiles
> Affects Versions: 2.0.9, 2.0.11
> Environment: Struts2 , Jboss 4.05, Windows, Java 5
> Reporter: RAUL
>
> 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)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.