5 Replies Latest reply on Mar 16, 2011 1:52 AM by PriyaRanjan Sahay

    Need help on JBoss 4.0.5

    PriyaRanjan Sahay Newbie

      Hi,

       

      I am working on an application which is deployed on JBoss 4.0.5, Default web container is Tomcat 5.5

      I need to suppress server information from the response, which is coming as : Apache Tomcat/5.5.20

      I tried manipulating the web.xml file : jbossas/server/default/deploy/jbossweb-tomcat55.sar/conf

      But it didn't help me.

       

      Can you help me to suppress this identity from server response?

       

       

       

      regards,

      Priya Ranjan Sahay

        • 1. Need help on JBoss 4.0.5
          Mark Paluch Master

          Hi Priya,

          there are two ways, where you can suppress JBoss and Tomcat-Messages:

          1. As you said, there is a web.xml where you can comment out CommonHeadersFilter and xpoweredBy
          2. Additionally, add custom error-pages to your server. You can do this either in your application web.xml or in the server's web.xml

          Best regards,

          Mark

          • 2. Need help on JBoss 4.0.5
            PriyaRanjan Sahay Newbie

            Hi Mark,

             

            Thanks for your response.

            First, I applied the second method. But it results in NullPointerException with org.acegisecurity.userdetails.UserDetails.

            When I remove this configuration, there is no NullPointerException.

            I tried to handle this programmatically with the help of a Filter & checking, therein, response code. But this also results in the above-mentioned NullPointerException.

             

            The first approach isn't able to suppress the information: Apache Tomcat/5.5.20

             

            I am using JBoss 4.0.5

             

            I got an article on : https://rhn.redhat.com/errata/RHSA-2007-0360.html

            I made the changes suggested in a) as well as b). But this also couldn't resolve my problem.

             

            Can you suggest me any other solution which helps me?

            Thanks.

             

            regards,

            Priya Ranjan Sahay

            • 3. Need help on JBoss 4.0.5
              Mark Paluch Master

              Please keep in mind, that error pages behavior different to normal pages. Error pages are invoked after the request (especially error 500 - internal server error). When you use resources, that are setup and cleaned up by a filter, that may cause error. Because of this it's often easier to use plain html-pages as error-pages. You also can post your error stack-trace, perhaps I can help.

              • 4. Need help on JBoss 4.0.5
                PriyaRanjan Sahay Newbie

                Hi Mark,

                 

                When I remove 404 configuration from web.xml, there is no NullPointerException.

                As soon as I configure this, it results in NullPointerException. Below is error stack-trace.

                 

                commenting out filter-mapping for CommonHeadersFilter is having no impact.

                 

                regards,

                Priya Ranjan Sahay

                 

                2011-03-15 12:07:17,562 ERROR [com.finalist.util.genelv.struts.GenericAction] A checked exception occured:
                java.lang.NullPointerException
                    at com.ibilt.actions.InitAddressBookSearchAction.doPerform(InitAddressBookSearchAction.java:54)
                    at com.finalist.util.genelv.struts.GenericAction.execute(GenericAction.java:69)
                    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
                    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
                    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
                    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                    at filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:169)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                    at com.ibilt.filter.ExpiredSessionFilter.doFilter(ExpiredSessionFilter.java:56)
                    at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:110)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                    at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
                    at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
                    at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:110)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                    at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:104)
                    at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:110)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                    at org.acegisecurity.concurrent.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:94)
                    at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:110)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:209)
                    at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:110)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:153)
                    at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:110)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:258)
                    at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:104)
                    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:268)
                    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:209)
                    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:268)
                    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
                    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:268)
                    at org.acegisecurity.concurrent.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:94)
                    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:268)
                    at com.ibilt.filter.ExpiredSessionFilter.doFilter(ExpiredSessionFilter.java:56)
                    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:268)
                    at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:142)
                    at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:110)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                    at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
                    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                    at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                    at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                    at java.lang.Thread.run(Thread.java:595)

                • 5. Need help on JBoss 4.0.5
                  PriyaRanjan Sahay Newbie

                  Hi Mark,

                   

                  Your one tip resolved my problem. I used plain html page as my error page.

                  Thanks a lot.

                   

                  regards,

                  Priya Ranjan sahay