Handling exception from method

Hi,

Can anyone let me know how can i handle exception tht r thrown from the method.

With try and catch i dont have any problem but when i try to use errorpage and comment all try catch blocks in the page the block of code into method declaration throws exception which i m not able to handle....

Thanks in Advance.

Hetal

[351 byte] By [hetal_giria] at [2007-11-27 8:47:10]
# 1

Be specific.Do you want to handle errors for plain java program or in any jsp page.

For jsp page forward the source jsp page to error page. Include the error page you defined in the source jsp page.When exception occurs the control will be transferred to the error page .

For plain java page , define a separate exception class. Throw the exception defined in this exception class and catch it where you want to be handled.You can rethrow the same exception defined until it is caught in later any class's catch block.

jagan18a at 2007-7-12 20:51:25 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...