This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I tested dispatcher with REQUEST,INCLUDE and FORWARD by calling HelloSevlet from diffent servlet using requestDispatcher.They are working fine.
I tried to test dispatcher with ERROR in the web.xml and couldn't able to test. I configured web.xml with error-page and changed my HelloServlet to throw Exception but the MyFilter never triggered when there is an error.
I tried to test dispatcher with ERROR in the web.xml and couldn't able to test. I configured web.xml with error-page and changed my HelloServlet to throw Exception but the MyFilter never triggered when there is an error.
I think HelloServlet should be catching the exception. The called to the filter will be made in case Servlet is invoked by means of error thrown mechanism from some other servlet.
I used the web.xml like below and it is working fine.I tested this with another servlet which throws IOException. Thanks for your help. ############################################################## <filter-mapping> <filter-name>MyFilter</filter-name> <servlet-name>HelloServlet</servlet-name> <dispatcher>ERROR</dispatcher> </filter-mapping>