-
1. Re: JBoss 5.1 how to change the default error pages
jaikiran Nov 15, 2010 6:21 AM (in response to m.wigge)Server-wide error pages can be configured in JBOSS_HOME/server/< servername>/deploy/jbossweb.sar/web.xml
-
2. Re: JBoss 5.1 how to change the default error pages
m.wigge Nov 15, 2010 7:59 AM (in response to jaikiran)Thanks jaikiran!
There was no file so i added a web.xml. Here is the code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<error-page>
<error-code>404</error-code>
<location>/error404.html</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/error500.html</location>
</error-page>
</web-app>That was just a test... which doesn't work. Is there anything missing in my web.xml? Where do I have to put the error pages in? JBOSS_HOME/server/<servername>/deploy/error500.html ?
Thanks
Mike
-
3. Re: JBoss 5.1 how to change the default error pages
jaikiran Nov 15, 2010 8:13 AM (in response to m.wigge)Mike Wigge wrote:
Thanks jaikiran!
There was no file so i added a web.xml. Here is the code:
Ooops, I was looking at my local AS 6.x instance. For AS5.x, the file is in JBOSS_HOME/server/< servername>/deployers/jbossweb.deployer folder.
-
4. Re: JBoss 5.1 how to change the default error pages
m.wigge Nov 15, 2010 10:50 AM (in response to jaikiran)Thanks again. It works!
Now I need to know where to save my error pages? Afaik it is not possible to deploy them like an application.
Regards
-
5. Re: JBoss 5.1 how to change the default error pages
peterj Nov 15, 2010 11:02 AM (in response to m.wigge)You should be able to place them in server/xxx/deploy/ROOT.war