Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

What is the difference between jsp exception handling and jsp error page?


Asked by Armando Galindo on Dec 06, 2021 JSP



Notice the isErrorPage page directive attribute value is true. When application resources throw exceptions, the error code is 500, the code is written to handle both application level exceptions and errors such as 404 – page not found. Also notice the use of include directive to present user with login page incase of any exception.
And,
They are: The page directive in JSP provides two attributes to be used in exception handling. They’re: errorPage: Used to site which page to be displayed when exception occurred. isErrorPage : Used to mark a page as an error page where exceptions are displayed.
In this manner, Exceptions you do not catch in the JSP page will result in forwarding of the request and uncaught exception to an error page. This is the preferred way to handle JSP errors. You can specify the URL of an error page by setting the errorPage parameter in a page directive in the originating JSP page.
Next,
Disadvantages of JSP Here are cons/drawbacks for using JSP: It is hard to trace JSP pages error because JSP pages are translated to servlet. As JSP output is HTML, it is not rich in features.
Just so,
Answer: The features are listed below: Create interactive websites. Makes it easy-to-read user input data and display server response. Use of implicit objects into the web page directly. Use of Java code into HTML pages through JSP. Makes database connectivity simple. Visitors can be tracked using Session, Application, or Cookies on the JSP page.