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

  • Home
  • SEARCH
  • 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 8869879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:35:08+00:00 2026-06-14T17:35:08+00:00

I already created a custom 404 page inside my web app deployed in JBoss

  • 0

I already created a custom 404 page inside my web app deployed in JBoss AS 7.1.
So if my app is at fubar dot com :8080/Myapp and I go to fubar dot com :8080/Myapp/xyzzy, I get the custom error page (defined in the web app’s web.xml file).

However, when I go to fubar dot com :8080/xyzzy, JBoss displays the default 404 page which discloses that it’s JBoss and which JBoss version.

I need to replace this page in order to hide this information.

Please advise.

  • 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-06-14T17:35:09+00:00Added an answer on June 14, 2026 at 5:35 pm

    If you want to customize the error pages for all the other contexts in JBoss 7, a part of the configuration you have in your Myapp application, you’ll also have:

    • to disable JBoss welcome page: in the file standalone/configuration/standalone.xml (or domain/configuration/domain.xml), set the attribute enable-welcome-root as false (by default it’s true)
    • Then you’ll have to deploy a simple war file setting its context-root to ‘/’, and define the error page for this war (using the same method you’ve used for Myapp). So, the war structure should be similar to (the error.war name is arbitrary):
       error.war
        |
        |- META-INF
        |- WEB-INF
        |     |    
        |     |- web.xml
        |     |- jboss-web.xml
        |
        |- error
              |- 404.html
    

    where The web.xml file is:

    <?xml version="1.0" encoding="UTF-8"?>
    <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">
      <display-name>yourcompanyname</display-name>
      <error-page>
                <error-code>404</error-code>
                <location>/error/404.html</location>
      </error-page>
    </web-app>
    

    And in the jboss-web.xml define the context-root as ‘/’, so it would be:

    <jboss-web>
        <context-root>/</context-root>
    </jboss-web>
    

    The file 404.html is your customized html error page that Jboss will show instead of the 404 default error. That’s all, deploy this application in JBoss 7, and you’ll have your custom 404 error page when you’ll visit fubar dot com:8080/yzyqqa or whatever other root context. Remember that you’ll have to keep the error configuration in your Myapp web.xml as well (and in all the other applications you may the deploy in the server).

    By the way, have you considered making your app Myapp accessible directly from fubar dot com:8080? Or even better, making the jboss server only accessible from a proxy (for example Apache)?.This way you’d avoid this problem as well.

    I hope it helps!

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

Sidebar

Related Questions

is there any custom asp.net membership providers that someone has already created online. I
I already created a top level Web Application and site collection. The powershell input
I have already created my application on web socket with ASP.net 4.0. I just
I've created a ASP.Net MVC 4 web site that has several custom routes which
I already created a custom map and placed some markers but the embedded code
I have already created a custom layout for my Magento theme which works fine.
I'm already familiar with property bindings in XAML. Now I've created a custom UserControl
I have created a custom kanban board. Inside the board, I have a button
I'm trying to make a custom exit button, and I have already created a
We have already created custom module for searching but pagination not working. we have

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.