KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
For servlet lifecycle stuff, what do you guys recommend doing in response to an exception... For example, public class Foo implements ServletContextListener { @Override public void contextInitialized(ServletContextEvent event) { try { // something nasty } catch (Exception e) { throw new RuntimeException(e); } } @Override public void contextDestroyed(ServletContextEvent event) { try { // something nasty } catch (Exception e) { throw new RuntimeException(e); } } I'm not entirely sure what will handle the runtime exception above. I'm working from the idea that if exceptions are thrown here, they're serious enough to break the system completely so an (unhandled) runtime exception may be ok. I guess I'm asking what handles unchecked exceptions from servlet context listeners?
Tags (comma-separated)
Save Edits
Cancel