I tried to follow AJP Sampler tutorial, except I'm using Tomcat 7 and not 9 as suggested and running tomcat using eclipse and maven tomcat plugin
When I define AJP Sampler with working POST requests I'm getting errors as
With 8009 port:
Response code: Non HTTP response code: java.net.ConnectException
Response message: Non HTTP response message: Connection refused: connect
With 8080 port (as in regular HTTP request):
Response code: Non HTTP response code: java.io.IOException
Response message: Non HTTP response message: Connection Closed: -1
Do I need to define another configuration in tomcat to allow AJP request?
AJP connector isn't starting by default in tomcat plugin:
ajpPort int 2.0 The AJP port to run the Tomcat server on. By default it's 0 this means won't be started. The ajp connector will be started only for value > 0. Will be exposed as System props and session.executionProperties with key tomcat.maven.ajp.port
Adding ajpPort
in pom.xml fixed the issue
<ajpPort>8009</ajpPort>