# [Java]如何設定錯誤發生時導入錯誤頁面 ###### tags: `Java` 1. 在web.xml設定 2. 可分成兩種錯:exception和http status exception: ```xml <web-app> <error-page> <exception-type>java.lang.NullPointerException</exception-type> <location>/NullPoint.html</location> </error-page> </web-app> ``` http status: ```xml <web-app> <error-page> <error-code>403</error-code> <location>/error404.html</location> </error-page> </web-app> ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up