| Author |
Showing Exception Message in client side
|
yekkala krishna
Ranch Hand
Joined: Mar 04, 2007
Posts: 105
|
|
Hi,
Actually in my servlet i am reading devices from a file.
But when FileNotFoundException occurs i need to see that exception in the jsp page.
how can i show the exception message in jsp?
could any body suggest?
Regards,
Rama
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56196
|
|
You can map an error handling page in the deployment descriptor.
But be aware that showing exceptions to uses is generally considered a bad practice. Rather, it is more customary to log the exceptions for the developers, and to show the users a more generic "sorry, but something went wrong" message.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Kumar Raja
Ranch Hand
Joined: Mar 18, 2010
Posts: 457
|
|
|
As Bear suggested, you can configure errors and exceptions in web.xml. Please see the link
|
Regards
KumarRaja
|
 |
 |
|
|
subject: Showing Exception Message in client side
|
|
|