Thanks for the tips. 

> What I haven't tried to do yet (time, I always need more 
> time) is sit down
> and distinguish between forcing all static content (.html, 
> .gif, .jpeg, etc)
> to be done via Apache (though mod_webapp...since we all know 
> that mod_jk can
> in fact do this).

Well I have scoured the web, mailing lists, FAQ's and anything else related to tomcat 
or webapp and still have no idea if this is possible. I am starting to think it is 
not. But best of luck if you decide go and do this and let me know if its successful! 
:)

I am most likely going to just use mod_jk now. 

If you are interested, this is what I did in my latest attempt.

in httpd.conf:
========================
<IfModule mod_webapp.c>
    WebAppConnection conn      warp  127.0.0.1:8008
    WebAppDeploy     examples    conn  /examples
    WebAppDeploy     manager     conn  /manager
    WebAppDeploy     .           conn  /
    WebAppInfo /webapp-info
</IfModule>
========================
in server.xml:
========================
 <!-- Define an Apache-Connector Service -->
  <Service name="Tomcat-Apache">

    <Connector className="org.apache.catalina.connector.warp.WarpConnector"
     port="8008" minProcessors="5" maxProcessors="75"
     enableLookups="true" appBase="/web/docroot"
     acceptCount="10" debug="0"/>

    <!-- Replace "localhost" with what your Apache "ServerName" is set to -->
    <Engine className="org.apache.catalina.connector.warp.WarpEngine"
     name="myhost.mydomain.com" debug="0">

      <!-- Global logger unless overridden at lower levels -->
      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="apache_log." suffix=".txt"
              timestamp="true"/>

      <!-- Because this Realm is here, an instance will be shared globally -->
      <Realm className="org.apache.catalina.realm.MemoryRealm" />

    </Engine>

  </Service>
======================

That configuration *did* allow me to process JSP's that were within my html docroot, 
but the downside is that my apache aliases, such as my cgi-bin, were lost, and other 
Apache directives such as index files were ignored. I know some of these issues can be 
fixed by changing the tomcat configuration, but I would rather keep configuration 
settings like those in my httpd.conf and not have to copy them over to the tomcat 
config every time i make a change.

> That being said there are still ways to make this steup 
> function/process
> files differently. On the page you quoted, as an example, I 
> placed a 'note'
> that talks about how Apache analyzes 'Location' directives 
> before sending
> them off to WARP, unlike how Apache ends up 'ignoring' 'Directory'
> directives. Through the 'Location' directive you can actually 
> have some
> other module process the files.

I thought perhaps I could try using the 'Files' directive, but on further analysis is 
doesn't look like it would work:
<Files *.jsp>
    WebAppConnection conn   warp  127.0.0.1:8008
    WebAppDeploy     .      conn  /what/would/go/here?
    Options Indexes ExecCGI
</Files>

Thanks to those who have tried to help me. I appreciate it. If anyone out there has 
managed to get JSP's *within the web docroot* processed with mod_webapp while at the 
same time having apache serve the static files and otherwise handle serving, PLEASE 
LET ME KNOW!! If no-one has, perhaps we should let the developers know...

-Brian

Reply via email to