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

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -