2 Replies Latest reply on Jul 11, 2013 1:26 PM by rdiddly

    Porting JBoss 4.2.2 to JBoss AS 7.1.1

    rdiddly

      Hi.

       

      I have a new, unexpected problem in my endeavor to upgrade my deployment to JBoss AS 7.1.1. In my jsp pages I often reference other resources, i.e., with script tags, or link tags, etc. In an attempt to eliminate the issue with web browsers where http calls are made from content delivered via https, I usually have something like this in the url:

       

      <script type="text/javascript" src="${pageContext.request.scheme }://www.google.com/jsapi"></script>

       

      I use Apache as the web server. It forwards requests to my web apps using ajp. In the old environment, this all worked fine. In this new environment, I'm getting errors when the page loads:

       

      Failed to load resource: unsupported URL          ajp://www.google.com/jsapi

       

      I imagine this is an issue having to do with JSPs, or Servlet spec upgrades, but I was wondering if anyone might point me to where I might look for more information, or even tell me how to solve the problem.

       

      Thanks in advance.

       

      Richard

        • 1. Re: Porting JBoss 4.2.2 to JBoss AS 7.1.1
          rdiddly

          I realized that this might have to do with my standalone.xml file which I modified to get ajp to work at all from Apache. I found somewhere that I needed to add a line to the config file:

           

                  <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">

                      <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

          ***            <connector name="ajp" protocol="AJP/1.3" scheme="ajp" socket-binding="ajp"/>

                      <virtual-server name="default-host" enable-welcome-root="true">

                          <alias name="localhost"/>

                          <alias name="example.com"/>

                      </virtual-server>

                  </subsystem>

           

          The line I added is the one with the asterisks. The page that I found this information on (a docs.jboss page for AS 7.0) said "Don't use scheme="ajp"." So I didn't. But without it, I had an error when I started jboss. Said scheme was required. So, I added scheme="ajp".

           

          Does anyone know how this should be configured?

           

          Thanks again.

          • 2. Re: Porting JBoss 4.2.2 to JBoss AS 7.1.1
            rdiddly

            Just in case anyone is interested, I solved my problem. I found another blog post about configuring Apache and ajp as a front end to JBoss 7.1 and their standalone.xml looked like this:

             

                    <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">

                        <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>

                        <virtual-server name="default-host" enable-welcome-root="true">

                            <alias name="localhost"/>

                            <alias name="example.com"/>

                        </virtual-server>

                    </subsystem>

             

            So, thanks for the fish.