tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "yesidredondo" <yesidredo...@www.ismgroupwwp.com>
Subject Export to Excel
Date Mon, 15 May 2006 05:06:30 GMT
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Mime
View raw message