Hi all, i've an application that have a report that must be oppened with
excel, what i've done is that i have a tapestry page as usual (with the .page
and the BasePage) and in the PageBeginReder method i put this lines:

HttpServletResponse responses =
this.getPage().getRequestCycle().getRequestContext().getResponse();
                try {
                                
responses.setContentType("application/vnd.ms-excel");
                        responses.setHeader("Content-disposition",
                          "inline; filename=reporte.xls");
                        responses.setContentType("application/vnd.ms-excel");
                        
                        responses.flushBuffer();

                } catch (IOException e) {
                        e.printStackTrace();
                }

So in another page i put a link to this one and it should be oppened
correctly, the thing is that this implementation is working fine on JBoss
4.0.3 and OC4J 10.0.3 but when i tested it on OC4J 9.0.4 it is showing this 
error:

java.lang.IllegalStateException: Response is already committed!
at com.evermind[Oracle Application Server Containers for J2EE 10g
(9.0.4.0.0)].server.http.EvermindHttpServletResponse.setContentType(EvermindHttpServletResponse.java:1049)
at
org.apache.tapestry.request.ResponseOutputStream.open(ResponseOutputStream.java:182)
at
org.apache.tapestry.request.ResponseOutputStream.write(ResponseOutputStream.java:270)
at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
.......


Would appreciate any help, about how to fix this error or how to make a .xls
page with Tapestry. 


Hermann Yesid Redondo Eslava
IngenierĂ­a de Sistemas
IT-GROUP

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to