Exception
- In JSP, there are two ways to perform exception handling
1) By errorPage and isErrorPage attributes of page directive
2) By <error-page> element in web.xml file
1. By the elements of page directive
1_1. index.jsp
1_2. process.jsp
1_3. error.jsp
1_4. result
2. By specifying the error-page element in web.xml
- This approach is better because you don't need to specify the errorPage attribute in each jsp page
- In this case, either specify exception-type or error code with the location element
2_1. web.xml
- If you want to handle any exception
- If you want to handle the exception for a specific error code
2_2 . error.jsp
'Back-End > Jsp' 카테고리의 다른 글
[Jsp] (2)Action Tags_useBean (0) | 2016.07.08 |
---|---|
[Jsp] (1)Action Tags_forward&include (0) | 2016.07.07 |
[Jsp] Include & taglib directive (0) | 2016.07.07 |
[Jsp] Page directives (0) | 2016.07.06 |
[Jsp] Implicit Object_2 (0) | 2016.07.06 |