Java.lang.throwable and error codes -



Java.lang.throwable and error codes -

i have question java.lang.throwable , cover error codes mean if added in web.xml:

<error-page> <exception-type>java.lang.throwable</exception-type> <location>/servicenotavailable</location> </error-page>

will applicable error codes 400,404,503,500, , don't need create customization them?

i think need mix of strategies.

using <exception-type>java.lang.throwable</exception-type> grab (not all) of error 500s , none of 404s

it hence good practise grab individual errors throwables.

you can add together <error-code> tag each of those

<error-page> <error-code>404</error-code> <location>/errors/error.jsp</location> </error-page>

you'll have define each error-code individually in web.xml.

java-ee error-handling web.xml http-status-codes

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -