How to set a custom 404 page in JBoss 5?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In general handling custom error pages is more to do with the servlet spec rather than the actual application container. Consequently, the most common place to put this is in your
web.xml, like this:If the above still does not work, verify that you have the correct XSD in your web.xml, it’s easy to use an old one that causes JBoss to fall back to an older version of the servlet API which doesn’t recognise the above tags. In general, this one works for me with servlet 2.5:
Out of interest, the JBoss 5.0.x and 5.1.0, the global
web.xmlfile is located atserver/<your server>/deployers/jbossweb.deployer/web.xml, and ROOT.war is atserver/<your server>/deploy/ROOT.war. This will allow you to make custom error pages for all applications within the server.