How to display message in Servlet

I try to display an error message for user to see.Please help me on that to develop the servlet program. Thanks
[125 byte] By [wesleygcha] at [2007-11-27 8:37:44]
# 1

servlet is server side , if u wan't to inform the client that an erros has accured u can do that in two simple ways :

a. when an exception has been cought responseredirect him to let's say error.jsp and display and appropiate message

b. include a div which has a

in the bottom of it when default value of visibility is set to hidden and when an error has accured for example failure on sever side validation stick appropiate attribute to session and return back to jsp ....

BOL.

Kernel_77a at 2007-7-12 20:35:02 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...