The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Exceptions in servlet

Posted by Diwakar on July 18, 2000 at 8:17 PM


I just wanted to know how to throw exceptions in Servlet so that
client(Applet) can catch it. I wanted to show exception message
on the client not on the web server.

I tried using ServletResponseException it does not work.

A detailed help in this regard is appreciated.

Right now we are passing error message through the object
thru the stream and client checks whether error message is
null or not. If it is not null then he calls getErrorMessage()
of that objects to show on the display.

But I just wanted to know a way of propagating exception
from servlet to client.




Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us