Much appreciated !

As for the procedure , once again goes to show how smart tapestry is built .

Cosmin
----- Original Message ----- From: "Jeff Lubetkin" <[EMAIL PROTECTED]>
To: "Tapestry users" <[email protected]>
Sent: Thursday, November 10, 2005 3:59 PM
Subject: RE: How to change content-type of rendered page in Tapestry 4.0


In your page class, override getResponseContentType:

public ContentType getResponseContentType()
{
return new ContentType("application/xml");
}

jeff
-----Original Message-----
From: Cosmin Bucur [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 10, 2005 12:21 PM
To: [email protected]
Subject: How to change content-type of rendered page in Tapestry 4.0

Hi ,
I have been searching the archives for this answer , but most solutions
are
for 3.0 and don't work with 4.0 anymore . I was able to achieve this by
overwriting the renderPage method of a custom BasePage obj :
public void renderPage(IMarkupWriter writer, IRequestCycle cycle) {
HttpServletResponse response =
cycle.getRequestContext().getResponse();
response.setContentType("application/xml");
super.renderPage(writer , cycle);
}
However , allthogh this works for now , the getRequestContext() fom the
IRequestCycle is also being deprecated . I was wondering what the proper

approach for achieving this in 4.0 is .
Thanks
Cosmin


---------------------------------------------------------------------
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]




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

Reply via email to