Would this help? @InjectObject("infrastructure:response") public abstract WebResponse getWebResponse();
OutputStream os = getWebResponse().getOutputStream(contentType); Stephane Decleire wrote: > getResponseWriter was very usefull to get and store the result of a > page generated by Tapestry instead of sending it to the user. > > ByteArrayOutputStream out = new ByteArrayOutputStream(); > IMarkupWriter writer = page.getResponseWriter(out); > cycle.activate(page); > cycle.renderPage(writer); > writer.flush(); > String body = out.toString(); > > None of those interfaces seems to be able to do the same thing ... > > Any idea is welcome > > Andreas Andreou wrote: > >> Yep, it was removed. >> getResponseWriter returned a IMarkupWriter instance and it was used >> by Tapestry 3 to render the page. >> Tapestry 4 uses an IMarkupWriter according to the page's content type. >> You can override the page's content type by overriding >> BasePage.getResponseContentType() >> >> Also take a look at the MarkupFilter interface, its implementation >> and the >> tapestry.markup.MarkupFilters configuration point. >> >> On the other hand, if you want to create IMarkupWriter instances >> you'll have to inject tapestry.markup.MarkupWriterSource and call >> newMarkupWriter() on it. >> >> Stephane Decleire wrote: >> >> >> >>> Hi, >>> >>> It seems that the function getResponseWriter of the BasePage class no >>> more exists in T4 ... >>> Am i wrong ? >>> Is there an equivalent function ? >>> >>> Thanks in advance. >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]