Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1970

Cannot read request attributes AJP_* defined by mod_proxy_ajp

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 2.2.5.Final, 2.2.8.Final
    • AJP
    • None
    • Hide
      1. Download attachments mycalcwebapp.war and httpd.conf
      2. Install Apache HTTPD with AJP
        docker rm -f apache-ajp
        docker run -dit --name apache-ajp -p 80:80 httpd:2.4
        docker cp httpd.conf apache-ajp:/usr/local/apache2/conf
        docker exec apache-ajp apachectl restart
        
      1. Download JBoss 7.4.0 EAP from https://developers.redhat.com/content-gateway/file/jboss-eap-7.4.0.zip and extract it to ~/jboss-eap-7.4/
      2. Run it from one tab via export JBOSS_HOME=~/jboss-eap-7.4 && $JBOSS_HOME/bin/standalone.sh
      3. Enter the JBoss CLI from another tab to create the AJP listener
        export JBOSS_HOME=~/jboss-eap-7.4 && $JBOSS_HOME/bin/jboss-cli.sh
        [disconnected /] connect
        standalone@localhost:9990 /] /socket-binding-group=standard-sockets/socket-binding=ajp:add(port=8009)
        ...
        [standalone@localhost:9990 /] /subsystem=undertow/server=default-server/ajp-listener=myListener:add(socket-binding=ajp, scheme=http, enabled=true)
        
      1. Deploy the servlet
        export JBOSS_HOME=~/jboss-eap-7.4 && cp mycalcwebapp.war $JBOSS_HOME/standalone/deployments
        

      See also README-1.md.

      Show
      Download attachments  mycalcwebapp.war and  httpd.conf Install Apache HTTPD with AJP docker rm -f apache-ajp docker run -dit --name apache-ajp -p 80:80 httpd:2.4 docker cp httpd.conf apache-ajp:/usr/ local /apache2/conf docker exec apache-ajp apachectl restart Download JBoss 7.4.0 EAP from https://developers.redhat.com/content-gateway/file/jboss-eap-7.4.0.zip and extract it to ~/jboss-eap-7.4/ Run it from one tab via export JBOSS_HOME=~/jboss-eap-7.4 && $JBOSS_HOME/bin/standalone.sh Enter the JBoss CLI from another tab to create the AJP listener export JBOSS_HOME=~/jboss-eap-7.4 && $JBOSS_HOME/bin/jboss-cli.sh [disconnected /] connect standalone@localhost:9990 /] /socket-binding-group=standard-sockets/socket-binding=ajp:add(port=8009) ... [standalone@localhost:9990 /] /subsystem=undertow/server=default-server/ajp-listener=myListener:add(socket-binding=ajp, scheme=http, enabled=true) Deploy the servlet export JBOSS_HOME=~/jboss-eap-7.4 && cp mycalcwebapp.war $JBOSS_HOME/standalone/deployments See also  README-1.md .

      I'm trying to read the incoming HTTP Servlet request attribute when using AJP with the Apache module "mod_proxy_ajp", but I receive null as a result.

      This works on JBoss EAP 7.3.0 (Undertow 2.0.28.SP1-redhat-00001).

      It does not work on neither JBoss EAP 7.4.0 (Undertow 2.2.5.Final-redhat-00001) nor WildFly 24.0.1 (Undertow 2.2.8.Final).

        1. httpd.conf
          21 kB
          Milad Bourhani
        2. mycalcwebapp.war
          139 kB
          Milad Bourhani
        3. mycalcwebapp-1.war
          138 kB
          Milad Bourhani
        4. README.md
          2 kB
          Milad Bourhani
        5. README-1.md
          2 kB
          Milad Bourhani

              rhn-cservice-bbaranow Bartosz Baranowski
              milad.bourhani Milad Bourhani (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: