How to show error in the same web page when any jsp or servlet error occour

How to show the error information in same page when any error occured by jsp ,servelt or tomacat or any other reason. I do not want to move any other page to show the error.it riderct in same page with error information.How i can do this.
[245 byte] By [only2rajata] at [2007-10-3 7:44:51]
# 1
Hi ,if error occurred call the same JSP with the param "errorMSG" like....if(error){ forward("/YourJSP?error=yes")}and in ur JSP ....check if error.equals("yes") then display error
java_usera at 2007-7-15 2:46:09 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...