quote

martedì, aprile 24, 2007

errorPage in jsp vs error-page in web.xml

I had an argument with my colleague (and friend) Armand about how to manage exception in web application. Basically there are two ways to manage exception in web application:
- using error-page in the deployment descriptor;
- using the directive "errorPage" in the jsp.
Armand said that using the declaration in the web.xml is enough to manage all the possible error conditions. I agreed with him but I wanted to find a reason to make allowance for errorPage directive in the jsp.
I asked to Lucio the question and he said that using errorPage allow having different jsp pages, managing the error conditions, for different jsp, and you can't have the same behavior using error-page tag in web.xml because, in a such case, you can only specify the type of Exception.

Nessun commento: