java - web.xml - multiple exceptions are not handled -


i have code in web.xml

<error-page>     <exception-type>java.lang.nosuchmethodexception</exception-type>     <location>/jsp/errors/nosuchmethodexception.jsp</location> </error-page> <error-page>     <exception-type>java.lang.exception</exception-type>     <location>/jsp/errors/error.jsp</location> </error-page> 

where supposed handle these exceptions separately java.lang.nosuchmethodexception error.jsp being returned. if remove java.lang.exception section works java.lang.nosuchmethodexception.

i using jboss 7 as.

it looks like, although web application prepared catch both exceptions, captures java.lang.exception first.

as workaround, have tried define second error page (the generic one) 500 error code? it's same capturing exception , maybe work you...


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -