1 Reply Latest reply: Apr 26, 2012 5:15 AM by Thomas Goettlich RSS

    AJP connector: request URL protocol lost

    Thomas Goettlich Novice

      Hi there,

       

      we have an Apache 2.2.22 instance connecting to our JBoss 7.1.0.Final via AJP 1.3, configured using this information: https://docs.jboss.org/author/display/AS7/Web+subsystem+configuration

       

      All seems to work fine so far, with one exception:

       

      If I access the HttpServletRequest and get the request url, the protocol is given as undefined.

       

      Example (we're using Struts2 as our web framework):

       

      Request url is http://localhost/ourapp/someAction.action

       

      request.getRequestURL() returns "undefined://localhost/ourapp/someAction.action".

       

      Any idea what might go wrong?

       

      I'll try JBoss 7.1.1 and see if this was a bug that might have been fixed but I wasn't able to find anything on that in the release notes etc. so far.

      Thus I'm not sure whether this is a bug or just some misconfiguration.

       

      Any help would be highly appreciated.


      Thanks in advance.

        • 1. Re: AJP connector: request URL protocol lost
          Thomas Goettlich Novice

          Seems like I found the issue:

           

          In our configuration we had this line:

           

          <connector name="ajp" protocol="AJP/1.3" socket-binding="ajp" enabled="true">

           

          As you notice the scheme attribute is missing and thus the protocol seems to be undefined.

          Adding scheme="http" resolved it.

           

          The problem was that in JBoss 7.1.0.Final following the instructions I linked above yielded a result that contains:

           

          "scheme" => "http"

           

          Additionally, the server didn't complain about the scheme missing on startup.

           

          Trying to do the same in JBoss 7.1.1.Final yielded an error at startup, telling me that the scheme was missing.

          So I guess the issue was misconfiguration in conjuction with a bug (not complaining about the misconfiguration) that seems to be fixed in JBoss 7.1.1.Final.