3 Replies Latest reply on Aug 24, 2006 1:52 AM by Jiji Sasidharan

    Change the Error Report

    Jiji Sasidharan Newbie

      My application is running on Jboss 4.0.4 and JDK1.5, and I want to hide all the app server version details from the end user.

      If I try to access some urls like http://localhost:8080/conf/,
      http://localhost:8080/invoker/ etc, then I'm geting an error page given below.


      HTTP Status 404 - /conf/

      --------------------------------------------------------------------------------

      type Status report

      message /conf/

      description The requested resource (/conf/) is not available.

      --------------------------------------------------------------------------------

      Apache Tomcat/5.5.17


      Is there any way to hide the version info (Apache Tomcat/5.5.17) shown at the footer of the page??

      Is there any way to give our own error page instead of this error page?

      Pls help.. its very urgent.

        • 1. Re: Change the Error Report
          Peter Johnson Master

          Provide an error-page entry in your web.xml.

          • 2. Re: Change the Error Report
            Jiji Sasidharan Newbie

            I already provided an error-page entry in my application web.xml and if i try to access some invalid resources under my application i'm geting the page i configured in error-page.

            My issue is if i try to access any directory in jboss/server/default/work/jboss.web/localhost/ folder other than my web application I'm geting the default error page.

            My work folder contents are..

            [root@wgp localhost]# ll
            total 48
            drwxr-xr-x 2 root root 4096 Aug 23 20:23 _
            drwxr-xr-x 2 root root 4096 Aug 23 20:22 conf
            drwxr-xr-x 2 root root 4096 Aug 23 20:22 myApp
            drwxr-xr-x 2 root root 4096 Aug 23 20:22 data
            drwxr-xr-x 2 root root 4096 Aug 23 20:22 deploy
            drwxr-xr-x 2 root root 4096 Aug 23 20:22 invoker
            drwxr-xr-x 2 root root 4096 Aug 23 20:22 lib
            drwxr-xr-x 2 root root 4096 Aug 23 20:22 log
            drwxr-xr-x 2 root root 4096 Aug 23 20:22 tmp


            myApp is my application. All other directories are created by Jboss.

            http://localhost:8080/myApp/sdjhjh gives proper error page

            if i try any of the below urls, i will get a default error page given by JBoss with Tomcat version in its footer. I want to hide only the tomcat version.

            http://localhost:8080/conf/
            http://localhost:8080/deploy/
            http://localhost:8080/lib/
            http://localhost:8080/log/

            Is there any way to hide this info...?
            or any configuration in Jboss which will not create these directories in work folder?

            • 3. Re: Change the Error Report
              Jiji Sasidharan Newbie

              I could remove the directories conf, deploy, data etc from the work folder thru the following configuration in server.xml

               ........................
               <Host name="localhost" appBase="deploy"
               autoDeploy="false" deployOnStartup="false" deployXML="false">
               ........................
               ........................
              


              Now the content of work folder is

              [root@wgp localhost]# ll
              total 24
              drwxr-xr-x 2 root root 4096 Aug 24 12:48 _
              drwxr-xr-x 2 root root 4096 Aug 24 12:46 myApp
              drwxr-xr-x 2 root root 4096 Aug 24 12:46 invoker
              drwxr-xr-x 2 root root 4096 Aug 24 12:46 jbossws


              Is there any way to remove invoker and jbossws??

              My main issue(i.e to hide Tomcat version info) is still not resolved. :(
              Any idea??