Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3432438
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:26:57+00:00 2026-05-18T07:26:57+00:00

How to set a custom 404 page in JBoss 5?

  • 0

How to set a custom 404 page in JBoss 5?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T07:26:58+00:00Added an answer on May 18, 2026 at 7:26 am

    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:

    <error-page>   
      <error-code>404</error-code>   
      <location>/my-404.jsp</location>   
    </error-page>  
    <error-page>   
      <error-code>500</error-code>   
      <location>/my-500.jsp</location>  
    </error-page> 
    

    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:

    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
    

    Out of interest, the JBoss 5.0.x and 5.1.0, the global web.xml file is located at server/<your server>/deployers/jbossweb.deployer/web.xml, and ROOT.war is at server/<your server>/deploy/ROOT.war. This will allow you to make custom error pages for all applications within the server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom error page set up for my application: <customErrors mode=On defaultRedirect=~/errors/GeneralError.aspx
I'm trying to return a custom 404 page using IIS6. (I have a site
I working on a custom 404 page and keep getting a 500 error from
I have a call to a 404 page in a controller: $this->set('title','Page Not Found');
I have a C++ STL set with a custom ordering defined. The idea was
I've got an JComboBox with a custom inputVerifyer set to limit MaxLength when it's
I have a custom cell renderer set in JTable and it works but instead
I want to set up an ASP.NET custom control such that it has a
I have a custom UIView that generates a set of subviews and display them
I have a custom security principal object which I set in the global.asax for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.