You could try an HttpURLConnection from the client which will allow the
servlet to process the error as if it were talking to a browser. The the
client could get the response code to determine if there was an error.
Tim Gallagher
-----Original Message-----
From: M. Adkins [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 16, 1999 9:02 AM
To: [EMAIL PROTECTED]
Subject: Servlet Exception notification back to Java Client??
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
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html