Jay Kumar SenSharma [
https://community.jboss.org/people/jaysensharma] commented on the
document
"Add a global valve in AS7 (7.2.x)"
To view all comments on this document, visit:
https://community.jboss.org/docs/DOC-47954#comment-11711
--------------------------------------------------
(JBossAS7.2) I created a own Valve as following and altered the
"org.apache.catalina.valves.ErrorReportValve" class a little bit just to hide
some of the server specific information (like jboss web version in case of any error):
<valve name="globalErrorValve" module="my.global.valve"
class-name="org.apache.catalina.valves.ErrorReportValve"/>
And created module as following:
<?xml version="1.0" ?>
<module xmlns="urn:jboss:module:1.1" name="my.global.valve">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="GlobalErrorReportValve.jar"/>
</resources>
<dependencies>
<module name="sun.jdk"/>
<module name="javax.servlet.api"/>
<module name="org.jboss.as.web"/>
</dependencies>
</module>
Still in case of any Error (4xx or 5xx httop Response errors) JBoss uses the class which
is present inside the class "org.apache.catalina.valves.ErrorReportValve" which
is present inside the
"$JBOSS_HOME/modules/system/layers/base/org/jboss/as/web/main/jbossweb-7.2.0.Final.jar"
Why ?
--------------------------------------------------