On Apr 12, 2011, at 4:38 PM, Christopher Schultz wrote: > -----BEGIN PGP SIGNED MESSAGE----- > 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 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk2kuEEACgkQ9CaO5/Lv0PBpqACfVky6ZZvG/Rgpt4XK804jdbei > JpEAnj/NF2td4NNHoBAbFBRAgsUDkC0v > =xjBP > -----END PGP SIGNATURE----- >
Chris, 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. János --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org