I'm using Apache/Tomcat/mod_jk from Debian 3.0 (woody) to
serve multiple virtual hosts.

tomcat4        4.0.3-3woody2  Java Servlet 2.3 engine with JSP 1.2 support
j2re1.3        1.3.1.02b-2    Blackdown Java(TM) 2 Runtime Environment, St
j2sdk1.3       1.3.1.02b-2    Blackdown Java(TM) 2 SDK, Standard Edition
libapache-mod-jk 3.3a-4       Apache connector for Tomcat servlet engine
apache         1.3.26-0woody3 Versatile, high-performance HTTP server

I upgraded from tomcat 3.2 some months ago.  Since then I've
noticed (using top) that tomcat appears to be serving
graphics in addition to the JSP pages they appear on.  This
causes unnecessary load on the server.

My httpd.conf contains entries like this:

        <VirtualHost 172.16.0.127>
        DocumentRoot /home/user/example.com
        ServerName www.example.com
        RewriteEngine on
        RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
        RewriteCond %{HTTP_HOST} !^$
        RewriteRule ^(/.*)      http://www.example.com$1 [L,R=permanent]
        ErrorDocument 404 http://www.example.com/index.jsp
        JkMount /*.jsp ajp13
        <Location "/WEB-INF/">
            AllowOverride None
            deny from all
        </Location>
        <Location "/META-INF/">
            AllowOverride None
            deny from all
        </Location>
        </VirtualHost>

workers.properties has:

        workers.tomcat_home=/usr/share/tomcat4
        ps=/
        worker.list=ajp13
        worker.ajp13.port=8009
        worker.ajp13.host=localhost
        worker.ajp13.type=ajp13
        worker.ajp13.lbfactor=1
        worker.loadbalancer.type=lb
        worker.loadbalancer.balanced_workers= ajp13
        worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
        worker.inprocess.cmd_line=start
        
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)classic$(ps)libjvm.so
        worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
        worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr

server.xml looks like this:

        <Server port="8005" shutdown="SHUTDOWN" debug="0">
          <Service name="Tomcat-Standalone">
            <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
                       port="8009" minProcessors="5" maxProcessors="75"
                       acceptCount="10" debug="0" address="127.0.0.1"/>
            <Engine name="Standalone" defaultHost="localhost" debug="0">
              <Logger className="org.apache.catalina.logger.FileLogger"
                      prefix="catalina_log." suffix=".txt"
                      timestamp="true"/>
              <Realm className="org.apache.catalina.realm.MemoryRealm" />

                <Host name="www.example.com" debug="0"
                        appBase="/home/user" unpackWARs="false">
                    <Context path=""
                        docBase="example.com"
                        debug="0"
                        privileged="false" >
                    </Context>
                </Host>
            </Engine>
          </Service>
        </Server>


Is there something I have to set to tell Tomcat to close the
connection to the browser after serving the jsp page?

Thanks.

Attachment: msg83177/pgp00000.pgp
Description: PGP signature

Reply via email to