Women in Technology

Hear us Roar

  How Servlet Containers Work
Subject:   Servlet exception
Date:   2006-09-19 21:15:05
From:   Pemmasani
What happens if any exception comes in init() if I forget to handle the exception.
Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Servlet exception
    2008-06-19 13:43:15  jtai1111 [View]

    Well, lets thing about it. Firstly what is an exception? It is a run time error which is recoverable if there are catch clauses. So if you have no catch clause, then your exception is an error. So where is the control of the application? You have your init() method, and the request has already been passed to the servlet container, and is now in the process of executing your servlet.

    If there is an exception, just like in Java, it will crash, from a front end, if you control it correctly, you can make sure your user(s) don't see the stack trace(which is dangerous sometimes)

    What else would happen?

    -good luck