In this article, I will tell you how a JSP page exception is thrown (throw) and how to capture these exceptions so that you can get more favorable information in JSP design. First, what is Exceptions What is well known to exception is an exception event that may appear anywhere in the program, such as: You try to connect a database, but this database has been closed, then an exception is generated. How to capture (throw) One exception? We can use The following expression: <% try {// code Which can throw can exception} catch (Exception E) {// Exception Handler code Here}%> Of course, there is another useful way: is the specified exception Handling the page, it is handled by it when an exception occurs. This is what I will tell. Establish three pages: 1.Form.html (Simple age input basket) code as follows:
Body, Input {Font-Family: Tahoma; font-size: 8pt;
style>
hEAD>