I'm seeing some different than expected behavior with regards to exception
handling inside my bean's accessor methods and was wondering if anyone has
come upon a better way to do this. If I throw an exception inside a bean's
accessor method, for example
public String getResults() {
if (! condition)
throw new RuntimeException("Condition not met");
else
return results;
}
I would expect that my custom exception and message would get forwarded on
to my error page and reported through the implicit exception object. This
only seems to happen if I call the method directly through a scriptlet, and
not when I access it through <jsp:getProperty>. Using the bean tag I instead
get a "can't execute getResults" message - not my message. It appears that
the bean accessor is trapping exceptions and returning its own exception.
Shouldn't it at least forward the actual exception on to the exception
object? This is JRUN 2.3.2.
Duane Fields
[EMAIL PROTECTED]
Duane Fields
[EMAIL PROTECTED]
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".