added application listener for the exception page.