If the application was well written, it probably threw an exception and displayed an error page. Exceptions that occur while a JSP application is running are called runtime exceptions. Just as in a Java application, an exception is an object that is an instance of java.lang.Throwable or one of its subclasses. Throwable has two standard subclasses- java.lang.Exception, which describes exceptions, and java.lang.Error , which describes errors.
Errors are different from exceptions.
Errors usually indicate linkage or virtual machine problems that your Web application probably won't recover from, such as running out of memory. Exceptions, however, are conditions that can be caught and recovered from. These exceptions might be, for example, a NullPointerException or a ClassCastException , which tell you that a null value or a value of the wrong data type has been passed to your application while it is running. Runtime exceptions are easy to handle in a JSP application, because they are stored one at a time in the implicit object named exception . You can use the exception object in a special type of JSP page called an error page, where you display the exception's name and class, its stack trace, and an informative message for your user.