Thanks for all the suggestions, I think they have confirmed what I
suspected - that simply passing data as XML strings wasn't really good
enough.  I've changed to something along the lines of Rob's suggestion and
now have error propagation.  I guess I just have to handle them now!

-Dominic

At 08:28 AM 2/17/00 -0800, you wrote:
>Exceptions are already Serializable; IIRC, it comes from either Exception or
>Throwable.
>
>Ted Neward
>Java Instructor, DevelopMentor ( http://www.develop.com )
>http://www.javageeks.com/~tneward
>-----Original Message-----
>From: Nic Ferrier <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>Date: Tuesday, February 15, 2000 4:48 AM
>Subject: Re: Error Propogation
>
>
> >>>> Dominic Tulley <[EMAIL PROTECTED]> 16-Feb-00 11:23:52 AM >>>
> >
> >> I'm looking for suggestions on how to propagate errors from a
> >servlet to
> >>an applet.
> >
> >Develop a serializable exception, have all your application
> >exceptions extend that and then when you get one you can serialize it
> >down the URLConnection's stream.
> >
> >
> >>I found HttpServletResponse.sendError() but it doesn't really seem
> >to
> >>do the job...
> >
> >No. It's not really meant for that purpose. It could be used though.
> >
> >Encode the error as a String header field (ie: exception.toString())
> >and when you get an error response to some HTTP request use:
> >
> >throw Class.forName(
> >URLConnection.getHeaderField("error-header-name") ).newInstance();
> >
> >
> >That will throw an exception with the same name as the one you have
> >in the header named:
> >"error-header-name"
> >
> >
> >
> >Nic Ferrier
> >
> >___________________________________________________________________________
> >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
>
>___________________________________________________________________________
>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

___________________________________________________________________________
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

Reply via email to