tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From János Löbb <>
Subject Re: [OT] servlet-specific error pages
Date Tue, 12 Apr 2011 20:56:06 GMT

On Apr 12, 2011, at 4:38 PM, Christopher Schultz wrote:

> Hash: SHA1
> All,
> I have a webapp where some of the servlets are expected to return XML
> all the time, even for error conditions. I'd like to be able to set an
> error page for those servlets so the response will be in XML instead of
> HTML like you'd get with the default Tomcat error page or an error page
> we might have configured for the rest of the site.
> I didn't see anything in web.xml that would allow me to set an error
> page for a particular servlet.
> Any good ideas?
> Obviously, I can create a system-wide "error" resource that determines
> the resource that was being used and then dispatch to either an
> HTML-oriented or XML-oriented error page, but I was wondering if
> something like that already existed or if there was a better approach.
> Thanks,
> - -chris
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla -
> iEYEARECAAYFAk2kuEEACgkQ9CaO5/Lv0PBpqACfVky6ZZvG/Rgpt4XK804jdbei
> JpEAnj/NF2td4NNHoBAbFBRAgsUDkC0v
> =xjBP


Look the 10.9 Error Handling in the 3.0 specifications.  It is maya to me but you might find
what you are looking for.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message