we are trying to handle error 401 by placing fallowing code in web.xml
<error-page>
<error-code>401</error-code>
/message.html
</error-page>
wich present under fallowing path :
\jboss-3.2.7\server\im\deploy\jbossweb-tomcat50.sar\conf
message.html is getting displayed always i.e we are unable to open the application