I have a Java-client that does the URL Connection to a servlet. This is in a try/catch construct.  The Client also reads the Servlet inputStream (getting back a byte[] GIF from the servlet).

All works fine...except when something goes wrong. I want to tell the client what went wrong.

Question:
When the servlet catches an exception, how can it throw an exception back to the client to catch??
I have tried setError() and throw new ServletException()....these seem to go to the servlet log, but the Java client knows nothing has happened. Is there something else I should be setting in the servlet or checking in the Java-Client??
 

Thanks

Reply via email to