Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Exception Handling with "text/xml" response content type

661599May 14 2009 — edited May 15 2009
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2009
Added on May 14 2009
1 comment
207 views