We have heard some comments from the community regarding the need to configure AJP Connector in GlassFish. I have gone ahead and expose the AJP Connector parameters in GlassFish so it's easy to configure the connector using a properties file.

Quick blog on how to configure AJP Connector in GlassFish


(1) First, install mod_jk - see Jeanfrancois's blog for more details


(2) Copy three necessary jars from tomcat and jakarta-commons

 * tomcat-ajp.jar      
 * commons-logging.jar
 * commons-modeler.jar

to $GLASSFISH_HOME/lib/.


(3) Enable mod_jk by adding :

$GLASSFISH_HOME/bin/asadmin create-jvm-options -Dcom.sun.enterprise.web.connector.enableJK=8009


(4) Create a glassfish-jk.properties file


(5) Let GlassFish know where you'd like to load glassfish-jk.properties from by adding :

$GLASSFISH_HOME/bin/asadmin create-jvm-options -Dcom.sun.enterprise.web.connector.enableJK.propertyFile=/home/amyroh/glassfish_home/domains/domain1/config/glassfish-jk.properties


(6) Restart GlassFish.

You can configure your AJP Connector starting GlassFish V2 build 13 (will be promoted on 8/16) or any nightly builds after 8/12/06.