######################################################################
#              Apache-Tomcat Smart Context Redirection               #
######################################################################
LoadModule jserv_module modules/ApacheModuleJServ.dll
<IfModule mod_jserv.c>
ApJServManual on
ApJServDefaultProtocol ajpv12
ApJServSecretKey DISABLED
ApJServMountCopy on
ApJServLogLevel notice

ApJServDefaultHost localhost
ApJServDefaultPort 8007
#
# Mounting a single smart context:
#
# (1) Make Apache know about the context location.
Alias /examples D:\tomcat\webapps\examples
Alias /test D:\tomcat\webapps\test
Alias /myapp D:\forte4j\Development\Pifen\webapps\myapp
Alias /admin D:\tomcat\webapps\admin

# (2) Optional, customize Apache context service.
<Directory "D:\tomcat\webapps\examples">
    Options Indexes FollowSymLinks
# (2a) No directory indexing for the context root.
#    Options -Indexes
# (2b) Set index.jsp to be the directory index file.
#    DirectoryIndex index.jsp
</Directory>

<Directory "D:\tomcat\webapps\test">
Options Indexes FollowSymLinks
</Directory>

<Directory "D:\forte4j\Development\Pifen\webapps\myapp">
Options Indexes FollowSymLinks
</Directory>


# (3) Protect the WEB-INF directory from tampering.
<Location /examples/WEB-INF/>
    
</Location>

<Location /test/WEB-INF/>
   
</Location>



# (4) Instructing Apache to send all the .jsp files under the context to the 
# jserv servlet handler. 
<LocationMatch /examples/*.jsp>
    SetHandler jserv-servlet
</LocationMatch>

<LocationMatch /test/*.jsp>
    SetHandler jserv-servlet
</LocationMatch>

<LocationMatch /myapp/*.jsp>
    SetHandler jserv-servlet
</LocationMatch>

<LocationMatch /admin/*.jsp>
    SetHandler jserv-servlet
</LocationMatch>


# (5) Direct known servlet URLs to Tomcat.
ApJServMount /examples/servlets /examples

# (6) Optional, direct servlet only contexts to Tomcat.
ApJServMount /servlet /ROOT


</IfModule>
