Exception Handling with "text/xml" response content type
661599May 14 2009 — edited May 15 2009Hi,
My servlet generates "text/xml" output which is returned to a client program (not a browser). However, if something goes wrong during the generation of this XML content is there a way to signal this to the client program either through the content type returned or a parameter etc returned.
For example, would it be possible to return a "text/plain" MIME type when an Exception occurs which details the reason for the Exception. The client program could then check on the content type returned.
Or could it be encapsulated as part of a HTTP response attribute?
Just wondering what is the best approach to take here.
Thanks