2 Replies Latest reply on Feb 7, 2008 5:01 PM by szpak

    How to easy change JBossWeb banner at the bottom of error pa

      Hi,

      I would like to remove servlet engine version displayed at the bottom of the default html error pages (like JBossWeb/2.0.1.GA). I wasn't able to found info how to do that using config files (like a change of X-Powered-By in web.xml) and I have to set custom error pages for every error using:
      <error-page>
      <error-code>404</error-code>
      /custom404.jsp
      </error-page>
      in global web.xml.

      But it is quite inconvenient, when you don't need to write customized error pages for your application.

      So two question:
      1. Is it possible to change "JBossWeb/2.0.1.GA" on error pages using some magic config file?
      2. If not, maybe there are default jsp files in some war, which could be easily changed (but it looks those pages are generated directly in code)?

      I'm using JBossWeb 2.0.1.GA embedded into Jboss 4.2.2.GA.

      Thanks for help
      Marcin

        • 1. Re: How to easy change JBossWeb banner at the bottom of erro
          peterj

          Looks like the only way to change the footer of that page is to edit the ErrorReportValve source code.

          • 2. Re: How to easy change JBossWeb banner at the error page

            Thanks Peter for your reply. It shows me where to look into. The code recompilation often is not an option, but tracking references in JBossWeb source code I have found that sever info value is taken from:
            org/apache/catalina/util/ServerInfo.properties
            which is located in:
            $JBOSS_HOME/server/default/deploy/jboss-web.deployer/jbossweb.jar

            Changing server.info property gives specified value in the error message (jar repackaging is a less interference that recompiling a class). The side effect is that everywhere where server info value it taken (e.g. in logs) our changed value is used.

            That part is taken from Tomcat. Do you think it's worth to report feature request (to have configurable value in error page) to its issue tracker (or I'm the only one with that need)?