tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Boelstler <florian.boelst...@orbiz.com>
Subject simple tomcat problem
Date Mon, 19 Nov 2001 13:40:46 GMT
hi,

i tried the whole weekend to solve the following problem.
searched the tomcat mailing list archives, but found nothing helpful.

we have designed a servlet which dynamically creates html pages.
these pages are static html mixed with code which does database
requests, etc.
(like php does..)

we have successfully deployed it with the resin servletrunner.
because of our actual production sytem, which uses tomcat as a must,
we have to reconfigure the whole thing.

on our server are several virtual hosts configured under apache.
each host should use tomcat as a servletrunner.

our servlet is called through the servlet mapping:
example.com/orbit/DigiFun
 which works fine at the moment.
but as a main goal it should additionally called through all html-files
which
are accessible. i.e. example.com/index.html
here is the problem, it doesn´t work like i.e. the jsp-mapping...

because of presence of other companies on that system i´ll not allowed
to
do major changes at the system.xml (like changing prefix path
/servlet/*)

my configuration at the moment:

apache "httpd.conf"

<VirtualHost 123.123.123.123>
        ServerName www.example.com
        DocumentRoot /home/orbit/digifun/www/htdocs/0999
        ErrorLog
/home/orbit/webspace/orbit.com/stats/logs/httpd-error.log
        CustomLog
/home/orbit/webspace/orbit.com/stats/logs/httpd-access.log com
bined
        DirectoryIndex index.html
        JkMount /orbit/* ajp12
        JkMount /*.html ajp12
        <Location "/WEB-INF/">
                AllowOverride None
                deny from all
        </Location>
        <Location "/META-INF/">
                AllowOverride None
                deny from all
        </Location>
        <Location "/logs/">
                AllowOverride None
                deny from all
        </Location>
        <Location "/conf/">
                AllowOverride None
                deny from all
        </Location>
</VirtualHost>

<VirtualHost 123.123.123.123>
  ServerName demo3.example.com
  DocumentRoot /home/orbit/digifun/www/htdocs/0001/
        DirectoryIndex index.html
        JkMount /*.html ajp12
        JkMount /orbit/* ajp12
  ErrorLog /home/orbit/webspace/example.com/stats/logs/httpd-error.log
  TransferLog
/home/orbit/webspace/example.com/stats/logs/httpd-access.log
  CustomLog /home/orbit/webspace/example.com/stats/logs/httpd-full.log
combined
</VirtualHost>

<VirtualHost 123.123.123.123>
  ServerName demo4.example.com
  DocumentRoot /home/orbit/digifun/www/htdocs/0004/
        DirectoryIndex index.html
        JkMount /orbit/* ajp12
        JkMount /*.html ajp12
  ErrorLog /home/orbit/webspace/example.com/stats/logs/httpd-error.log
  TransferLog
/home/orbit/webspace/example.com/stats/logs/httpd-access.log
  CustomLog /home/orbit/webspace/example.com/stats/logs/httpd-full.log
combined
</VirtualHost>


"tomcat/conf/web.xml" left unchanged


"tomcat/conf/server.xml":
---snip---
        <Host name="www.example.com">
                <Context path=""
docBase="/home/orbit/digifun/www/htdocs/0999/" />
        </Host>
        <Host name="demo3.example.com">
                <Context path=""
docBase="/home/orbit/digifun/www/htdocs/0001/" />
        </Host>
        <Host name="demo4.example.com">
                <Context path=""
docBase="/home/orbit/digifun/www/htdocs/0004/" />
        </Host>
        <Host name="123.123.123.123">
                <Context path="" docBase="/home/orbit/" />
        </Host>
---snip---


"WEB-INF/web.xml" for all virtual hosts:

<web-app>
    <servlet>
        <servlet-name>
            DigiFun
        </servlet-name>
        <servlet-class>
            DigiFun
        </servlet-class>
        <load-on-startup>
            1
        </load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>
            DigiFun
        </servlet-name>
        <url-pattern>
            /orbit/DigiFun/*
        </url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>
            DigiFun
        </servlet-name>
        <url-pattern>
            /*.html
        </url-pattern>
    </servlet-mapping>

    <welcome-file-list>
        <welcome-file>
            index.html
        </welcome-file>
    </welcome-file-list>

</web-app>


in every host section you can see:
JkMount /*.html ajp12

i think http://demo3.example.com/index.html should run the servlet
DigiFun, right?
(but it doesn´t work:()

what files are additionally to be changed that html-files are invokers
for the "DigiFun"-servlet?

thanks for your help!

sincerely

  florian


-- 
-----------------------------------------------------------------
Florian Boelstler       |     eMail : florian.boelstler@orbiz.com
orbiz Software GmbH     |       www : http://www.orbiz.com
Blarerstr. 56           |       tel : +49 7531 12877-70
D-78462 Konstanz        |       fax : +49 7531 12877-77

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message