[jboss-user] custom error pages across all vhosts
Brett Cave
brettcave at gmail.com
Mon Nov 17 10:40:40 EST 2008
I would like to set up custom error pages across all vhosts on a JBoss
AS. I have configured web.xml in ROOT.war of jboss-web.deployer with
error-page / error-code / location directives for all errors -
"/error/404.html" for not found as an example.
I currently have the following setup on jboss:
The standard vhost
1 x name-based vhost (vhosts configured in server.xml)
custom error pages on ROOT.war/error and configured
ROOT.war/WEB-INF/web.xml for custom error pages.
1 x app deployed on /myapp/ to name-based vhost
What is needed to configure the custom error pages on the named virtual host?
my server.xml looks similar to:
<Engine name="jboss.web" defaultHost="localhost">
<Realm className="org.jboss.web.tomcat.security.JBossSecurityMgrRealm"
certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping"
allRolesMode="authOnly"
/>
<Host name="localhost"
autoDeploy="false" deployOnStartup="false" deployXML="false"
configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"
>
<Valve
className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"
cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"
transactionManagerObjectName="jboss:service=TransactionManager" />
</Host>
<Host name="myvhost"
autoDeploy="false" deployOnStartup="false"
configClass="org.jboss.web.tomcat.security.config.JBossContextConfig">
<Alias>vhost.access.uri</Alias>
<Valve
className="org.apache.catalina.valves.AccessLogValve"
prefix="someprefix-" suffix=".log"
pattern="common" directory="/path/to/log/" />
<DefaultContext cookies="true" crossContext="true"
override="true"/>
</Host>
</Engine>
I'm guessing I need a valve that uses errorReportValve to get this right?
Thanks.
Brett
More information about the jboss-user
mailing list