: My question is, should I use tomcat exception handling mechanism, or should I
: come up with my own exception handling framework?

A lot of this depends on your app's setup and how thorough/robust you
expect your handling to be as it grows.

1/ Quick-And-Dirty: map a "something went wrong" page to
java.lang.Throwable in web.xml.  Come back and design something more
robust after your alpha's out the door.

2/ Slightly Better: same as above, but wrap system exceptions in custom
exceptions and pull a message from a known request-scope key to print to
the browser.  You can evaluate for yourself whether you'd want to build
on this general idea, e.g. special error pages for special errors and a
generic page for generic errors.  There are innumerable variations on
this theme but you get the gist.

3/ If you're using Struts: there's some handy exception-handling built
in.  It works quite well for me.  It may work for you.  I haven't used
other frameworks but chances are they'd have something similar.

I do #3 for my larger, Struts-based apps and something similar to #2 for
the quick demos.  

-QM

--

software  -- http://www.brandxdev.net (C++ / Java / SSL)
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to