On Tue, February 19, 2013, Martin Grigorov wrote: > You can use requestCycle.replaceAllRequestHandlers(new > ResourceRequestHandler(new ByteArrayResource(byteArray))) in your page code. > This will stop the page rendering and will return the byte[] from this > response. You can still configure the ByteArrayResource - filename, > disposition, etc.
Thank you, I tried this (slightly corrected version): | RequestCycle.get().replaceAllRequestHandlers( new ResourceRequestHandler( new ByteArrayResource( mimeType, byteArray ), null ) ); But this triggers a ReplaceHandlerException at RequestHandlerStack.replaceAll() as at that time RequestHandlerStack.requestHandlers is not empty. This actually looks weird to me as I'd expect a 'replaceAll' method to replace what is already there. Maybe a bug here? Cheers, M'bert -- ----------- / http://herbert.the-little-red-haired-girl.org / ------------- =+= No violence, gentlemen -- no violence, I beg of you! Consider the furniture! -- Sherlock Holmes --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
