Hi, Thanks! Seems that the following code works, but
after the call to the lister method is finished the
Tapestry framework throws a lot of exceptions see
below.
Does anyone have an idea how to overcome this?
FileInputStream in = new
FileInputStream(file);
response.setHeader("Content-disposition",
"inline; filename=" + file.getName());
response.setContentType(mimetype);
response.setContentLength((int)size);
SStream out =
Stream();
while (in.read(data) -1) {
out.write(data);
}
in.close();
response.flushBuffer();
1765203 [http-8080-Processor23] ERRR
- Unable
to reset response buffer:
at
(ResponseFacade.java:307)
at
(ServletWebResponse.java:128)
at
(ServletWebResponse.java:90)
at
$($WebResponse_10e2dfd55ef.java)
at
$($WebResponse_10e2dfd54ca.java)
at
(ResponseRendererImpl.java:67)
at
$($)
at
(ExceptionPresenterImpl.java:46)
at
$($)
at
(AbstractEngine.java:121)
at
(AbstractEngine.java:280)
at
(InvokeEngineTerminator.java:60)
at
$($)
at
(WepromRequestFilter.java:38)
at
$($)
at
$($)
at
$($)
at
()
at
$($)
at
(DecodedRequestInjector.java:55)
at
$($)
at
$($)
at
(MultipartDecoderFilter.java:52)
at
$($)
at
$($)
at
(SetupRequestEncoding.java:53)
at
$($)
at
$($)
at
$($)
at
(ApplicationServlet.java:123)
at
(ApplicationServlet.java:79)
at
(HttpServlet.java:689)
at
(HttpServlet.java:802)
at
()
at
()
at
(RequestFilter.java:39)
at
()
at
()
at
(StandardWrapperValve.java:213)
at
(StandardContextValve.java:178)
at
(StandardHostValve.java:126)
at
(ErrorReportValve.java:105)
at
(StandardEngineValve.java:107)
at
(CoyoteAdapter.java:148)
at
(Http11Processor.java:869)
at
$(Http11BaseProtocol.java:664)
at
(PoolTcpEndpoint.java:527)
at
()
at
$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
1765219 [http-8080-Processor23] WARN
- Unable to
process client request: Stream() has already
been calle
d for this response
Stream() has
already been called for this response
at
(Response.java:599)
at
(ResponseFacade.java:195)
at
(ServletWebResponse.java:110)
at
$($WebResponse_10e2dfd55ef.java)
at
$($WebResponse_10e2dfd54ca.java)
at
(ResponseRendererImpl.java:67)
at
$($)
at
(DirectService.java:137)
at
$($)
at
(EngineSProxy.java:66)
at
(AbstractEngine.java:248)
at
(InvokeEngineTerminator.java:60)
at
$($)
at
(WepromRequestFilter.java:38)
at
$($)
at
$($)
at
$($)
at
()
at
$($)
at
(DecodedRequestInjector.java:55)
at
$($)
at
$($)
at
(MultipartDecoderFilter.java:52)
at
$($)
at
$($)
at
(SetupRequestEncoding.java:53)
at
$($)
at
$($)
at
$($)
at
(ApplicationServlet.java:123)
at
(ApplicationServlet.java:79)
at
(HttpServlet.java:689)
at
(HttpServlet.java:802)
at
()
at
()
at
(RequestFilter.java:39)
at
()
at
()
at
(StandardWrapperValve.java:213)
at
(StandardContextValve.java:178)
at
(StandardHostValve.java:126)
at
(ErrorReportValve.java:105)
at
(StandardEngineValve.java:107)
at
(CoyoteAdapter.java:148)
at
(Http11Processor.java:869)
at
$(Http11BaseProtocol.java:664)
at
(PoolTcpEndpoint.java:527)
at
()
at
$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Unable to process client request: Stream()
has already been called for this response
Session id :
Exceptions:
Stream() has
already been called for this response
(Response.java:599)
(ResponseFacade.java:195)
(ServletWebResponse.java:110)
$($WebResponse_10e2dfd55ef.java)
$($WebResponse_10e2dfd54ca.java)
(ResponseRendererImpl.java:67)
$($)
(DirectService.java:137)
$($)
(EngineSProxy.java:66)
(AbstractEngine.java:248)
(InvokeEngineTerminator.java:60)
$($)
(WepromRequestFilter.java:38)
$($)
$($)
$($)
()
$($)
(DecodedRequestInjector.java:55)
$($)
$($)
(MultipartDecoderFilter.java:52)
$($)
$($)
(SetupRequestEncoding.java:53)
$($)
$($)
$($)
(ApplicationServlet.java:123)
(ApplicationServlet.java:79)
(HttpServlet.java:689)
(HttpServlet.java:802)
()
()
(RequestFilter.java:39)
()
()
(StandardWrapperValve.java:213)
(StandardContextValve.java:178)
(StandardHostValve.java:126)
(ErrorReportValve.java:105)
(StandardEngineValve.java:107)
(CoyoteAdapter.java:148)
(Http11Processor.java:869)
$(Http11BaseProtocol.java:664)
(PoolTcpEndpoint.java:527)
()
$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)
1765281 [http-8080-Processor23] WARN
- Unable to
present exception page: Stream() has already
been calle
d for this response
Stream() has
already been called for this response
at
(Response.java:599)
at
(ResponseFacade.java:195)
at
(ServletWebResponse.java:110)
at
$($WebResponse_10e2dfd55ef.java)
at
$($WebResponse_10e2dfd54ca.java)
at
(ResponseRendererImpl.java:67)
at
$($)
at
(ExceptionPresenterImpl.java:46)
at
$($)
at
(AbstractEngine.java:121)
at
(AbstractEngine.java:280)
at
(InvokeEngineTerminator.java:60)
at
$($)
at
(WepromRequestFilter.java:38)
at
$($)
at
$($)
at
$($)
at
()
at
$($)
at
(DecodedRequestInjector.java:55)
at
$($)
at
$($)
at
(MultipartDecoderFilter.java:52)
at
$($)
at
$($)
at
(SetupRequestEncoding.java:53)
at
$($)
at
$($)
at
$($)
at
(ApplicationServlet.java:123)
at
(ApplicationServlet.java:79)
at
(HttpServlet.java:689)
at
(HttpServlet.java:802)
at
()
at
()
at
(RequestFilter.java:39)
at
()
at
()
at
(StandardWrapperValve.java:213)
at
(StandardContextValve.java:178)
at
(StandardHostValve.java:126)
at
(ErrorReportValve.java:105)
at
(StandardEngineValve.java:107)
at
(CoyoteAdapter.java:148)
at
(Http11Processor.java:869)
at
$(Http11BaseProtocol.java:664)
at
(PoolTcpEndpoint.java:527)
at
()
at
$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Unable to present exception page: Stream()
has already been called for this response
Session id :
Exceptions:
Stream() has
already been called for this response
(Response.java:599)
(ResponseFacade.java:195)
(ServletWebResponse.java:110)
$($WebResponse_10e2dfd55ef.java)
$($WebResponse_10e2dfd54ca.java)
(ResponseRendererImpl.java:67)
$($)
(ExceptionPresenterImpl.java:46)
$($)
(AbstractEngine.java:121)
(AbstractEngine.java:280)
(InvokeEngineTerminator.java:60)
$($)
(WepromRequestFilter.java:38)
$($)
$($)
$($)
()
$($)
(DecodedRequestInjector.java:55)
$($)
$($)
(MultipartDecoderFilter.java:52)
$($)
$($)
(SetupRequestEncoding.java:53)
$($)
$($)
$($)
(ApplicationServlet.java:123)
(ApplicationServlet.java:79)
(HttpServlet.java:689)
(HttpServlet.java:802)
()
()
(RequestFilter.java:39)
()
()
(StandardWrapperValve.java:213)
(StandardContextValve.java:178)
(StandardHostValve.java:126)
(ErrorReportValve.java:105)
(StandardEngineValve.java:107)
(CoyoteAdapter.java:148)
(Http11Processor.java:869)
$(Http11BaseProtocol.java:664)
(PoolTcpEndpoint.java:527)
()
$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)
1765297 [http-8080-Processor23] ERRR
[Catalina].[localhost].[/weprom]
- weprom: ServletException
Stream() has
already been called for this response
at
()
at
$($)
at
(DecodedRequestInjector.java:55)
at
$($)
at
$($)
at
(MultipartDecoderFilter.java:52)
at
$($)
at
$($)
at
(SetupRequestEncoding.java:53)
at
$($)
at
$($)
at
$($)
at
(ApplicationServlet.java:123)
at
(ApplicationServlet.java:79)
at
(HttpServlet.java:689)
at
(HttpServlet.java:802)
at
()
at
()
at
(RequestFilter.java:39)
at
()
at
()
at
(StandardWrapperValve.java:213)
at
(StandardContextValve.java:178)
at
(StandardHostValve.java:126)
at
(ErrorReportValve.java:105)
at
(StandardEngineValve.java:107)
at
(CoyoteAdapter.java:148)
at
(Http11Processor.java:869)
at
$(Http11BaseProtocol.java:664)
at
(PoolTcpEndpoint.java:527)
at
()
at
$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Stream() has
already been called for this response
Stream() has already been called for this
response
Stream() has
already been called for this response
(Response.java:599)
(ResponseFacade.java:195)
(ServletWebResponse.java:110)
$($WebResponse_10e2dfd55ef.java)
$($WebResponse_10e2dfd54ca.java)
(ResponseRendererImpl.java:67)
$($)
(ExceptionPresenterImpl.java:46)
$($)
(AbstractEngine.java:121)
(AbstractEngine.java:280)
(InvokeEngineTerminator.java:60)
$($)
(WepromRequestFilter.java:38)
$($)
$($)
$($)
()
$($)
(DecodedRequestInjector.java:55)
$($)
$($)
(MultipartDecoderFilter.java:52)
$($)
$($)
(SetupRequestEncoding.java:53)
$($)
$($)
$($)
(ApplicationServlet.java:123)
(ApplicationServlet.java:79)
(HttpServlet.java:689)
(HttpServlet.java:802)
()
()
(RequestFilter.java:39)
()
()
(StandardWrapperValve.java:213)
(StandardContextValve.java:178)
(StandardHostValve.java:126)
(ErrorReportValve.java:105)
(StandardEngineValve.java:107)
(CoyoteAdapter.java:148)
(Http11Processor.java:869)
$(Http11BaseProtocol.java:664)
(PoolTcpEndpoint.java:527)
()
$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)
1765406 [http-8080-Processor23] ERRR
[Catalina].[localhost].[/weprom].[weprom]
- Servlet.service() for servlet wep
rom threw exception
Stream() has
already been called for this response
at
(Response.java:599)
at
(ResponseFacade.java:195)
at
(ServletWebResponse.java:110)
at
$($WebResponse_10e2dfd55ef.java)
at
$($WebResponse_10e2dfd54ca.java)
at
(ResponseRendererImpl.java:67)
at
$($)
at
(ExceptionPresenterImpl.java:46)
at
$($)
at
(AbstractEngine.java:121)
at
(AbstractEngine.java:280)
at
(InvokeEngineTerminator.java:60)
at
$($)
at
(WepromRequestFilter.java:38)
at
$($)
at
$($)
at
$($)
at
()
at
$($)
at
(DecodedRequestInjector.java:55)
at
$($)
at
$($)
at
(MultipartDecoderFilter.java:52)
at
$($)
at
$($)
at
(SetupRequestEncoding.java:53)
at
$($)
at
$($)
at
$($)
at
(ApplicationServlet.java:123)
at
(ApplicationServlet.java:79)
at
(HttpServlet.java:689)
at
(HttpServlet.java:802)
at
()
at
()
at
(RequestFilter.java:39)
at
()
at
()
at
(StandardWrapperValve.java:213)
at
(StandardContextValve.java:178)
at
(StandardHostValve.java:126)
at
(ErrorReportValve.java:105)
at
(StandardEngineValve.java:107)
at
(CoyoteAdapter.java:148)
at
(Http11Processor.java:869)
at
$(Http11BaseProtocol.java:664)
at
(PoolTcpEndpoint.java:527)
at
()
at
$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Detlef Schulze <d.schulze (AT) iliuk (DOT) comwrote:
For version 3 there is an example in the online FAQ.
Should work for 4
too.
Message
From: Dobrin Ivanov
[mailto:dobrin_s_ivanov (AT) yahoo (DOT) com]
Sent: Montag, 9. 2006 00:43
To: Tapestry users
Subject: File Downloading in Tapestry
Hi,
I'm wondering which is the best way to download
files
via Tapestry. It could be done via servlet, I have
found a good example here:
But, is there another way to do it all in Tapestry?
or the above is the best solution?
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around
http://mail.yahoo.com
To unsubscribe, e-mail:
users-unsubscribe (AT) tapestry (DOT) apache.org
For additional commands, e-mail:
users-help (AT) tapestry (DOT) apache.org
To unsubscribe, e-mail:
users-unsubscribe (AT) tapestry (DOT) apache.org
For additional commands, e-mail:
users-help (AT) tapestry (DOT) apache.org
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org