Apache 2.x/mod-dav - Tomcat/jk2 - HOWTO

Apache Software Foundation | Jakarta Project | Apache Tomcat

## Apache 2.x/mod-dav - Tomcat/jk2 - HOWTO

print-friendly
version

Purpose

Use mod_dav to modify JSP pages.

extract of httpd.conf

The Alias is just for confort ;-)

      Alias /examples/jsp-source /home/jfclere/jakarta-tomcat-4.1.24/webapps/examples/jsp
      <Location /examples/jsp-source>
        Dav On

        AuthType Basic
        AuthName DAV
        AuthUserFile user.passwd

        <LimitExcept GET OPTIONS>
          require user admin
        </LimitExcept>
      </Location>

      <LocationMatch "/*.jsp">
        JkUriSet worker ajp13:localhost:8009
      </LocationMatch>

The LocationMatch only maps the *.jsp files. To have also the images it is possible to the DefaultServlet by mapping /examples.

      <Location /examples>
        JkUriSet worker ajp13:localhost:8009
      </Location>

Or to get the images served by httpd and not by Tomcat.

      Alias /examples/images /home/jfclere/jakarta-tomcat-4.1.24/webapps/examples/images

extract of workers2.properties

The worker ajp13:localhost:8009 of the JkUriSet Directive has to be defined in workers2.properties.

    # Example socket channel, override port and host.
    [channel.socket:localhost:8009]
    port=8009
    host=127.0.0.1

    # define the worker
    [ajp13:localhost:8009]
    channel=channel.socket:localhost:8009