Oracle Community Directory
Oracle Community FAQ
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
OTN Speaker Bureau
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
on Jun 25, 2007 12:11 PM by 807605
how to throw exception from ejb to web tier
Jun 25, 2007 11:40 AM
Can anybody suggest in catching the excepion in struts which is occured in ejb?Can u please send me some code?
This content has been marked as final.
Show 1 reply
Re: how to throw exception from ejb to web tier
Jun 25, 2007 12:11 PM
in response to
I dont know Struts.
We often use JSP in web tier and Java Beans inthe middle tier.
When a JavaBean throws an exception, inside the catch block, I Throw a new Exception which has to be caught by the JSP (Web tier).
The code looks like this
throw new yourException(exception.getMessage() + "\n");
I mean, we dont treat exceptions inside JavaBeans or Enterprise Java Beans. We designate this task to the Web Tier (JSP pages). I dont know if this helps you even so use it as you wish