You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jean-Baptiste Marchand <jb...@alternative-advice.com> on 2000/06/21 15:42:45 UTC

Tomcat with Apache : mapping extensions to servlets

Hi,

I'm a bit confused regarding the mapping of servlets in Tomcat. I'm
trying to make cooperate Tomcat with Apache.

What I've understood :

- It is possible to use both Apache and Tomcat. In such
  configuration, Apache is used to serve static pages while dynamic
  pages are handled by Cocoon.
  To decide whether an URL on the web server is handled by Apache or
  not, the ApJServMount directive is used.

- It is also possible to use the AddHandler directive to map an
  extension to the jserv-servlet handler.
  Ex : AddHandler jserv-servlet .jsp (from default
  tomcat-apache.conf).

  However, this mapping has the following side-effect : if I want to
  access a jsp page at the root of the web server, the page is
  searched at the root of the Tomcat zone (webapps/ROOT/), 
  because it is handled by Tomcat (because of the AddHandler
  directive).  

So my question is : is there a way to map extension independently of
the location of the file on the web server ? 

For examples, it would be nice that all .xml files would be handled by
Cocoon, wherever the files are (not necessarily in webapps/ subdirectory).

Thanks for your help.

Jean-Baptiste Marchand
-- 
Jean-Baptiste.Marchand@Alternative-Advice.com