Could someone tell me how to make play use my 404.xml and 500.xml when
using the notFound(), error(), etc.. functions? It seems to only
pickup the 404.html and 500.html. I can put XML data in these html
templates, but then the Content-Type of the response is still text/
html.
I tried:
reponse.contentType = "text/xml"
notFound()
But that didn't work.
Help is much appreciated.
Thanks.
On May 12, 3:30 pm, Gaëtan Renaudeau <
renaudeau.gae...@gmail.com>
wrote:
> Play use http code errors.
>
> If your code throwing an error during a http request, the server will (most
> of time) return a 500 http code error (if you don't catch exceptions).
> If you want to catch exception or handle security, you have some useful
> functions like forbidden() , notFound(), notFoundIfNull(anObject), ...
>
> You can customize errors pages depending of the http code error (404, 500,
> 403, ...) by editing app/views/errors/{code}.html files where {code} is you
> http code.
>
> If you are using other format than html (like xml, json) you can have
> 404.json , 404.xml, etc...
>
> 2011/5/12 Brandon@MediciGroup <
bran...@thegreshams.net>
> IM:
grenaud...@gmail.com