On Wed, Mar 21, 2001 at 02:23:38PM -0800, s l wrote:
> Is there a way to catch exceptions throw
> in bean's getter methods (so we don't have
> to see the stack trace on web page)?
> 
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail. 
> http://personal.mail.yahoo.com/

You are free to catch exceptions in your beans' getter and
setter methods. But (if I understand the direction of the
question) the "best practice considering the from beans is
to keep your form bean properties as strings. This way you
avoid exceptions during automatic request parameter population
and your form bean is ready to report back the errorprone
inputfields as they were entered. Validate methods will
investigate that these strings are OK to be converted to
your business model, and your action will actually do
the transformation and check the parameters against business
rules. Maybe I misunderstood your problem.            incze

Reply via email to