tags:

views:

177

answers:

1

How do I configure Apache to forward a URLa of a certain extension, say *.htm to my Servlet container, in this case, Resin, without first checking for the file's existence.

Currently, if Apache can not find the requested file in the directory structure, it serves a 404, even though my web.xml Servlet mapping would handle the request if forwarded.

I've temporarily resorted to placing an empty file matching the requested file within my web structure (i.e. c:/dir/dir/index.htm) so that Apache forwards the request.

Resin's Apache configuration is a bit different than Tomcat's (below), however the problem seems to exist entirely within Apache since the request never makes it to Resin.

Help would be greatly appreciated.

LoadModule caucho_module c:/resin-pro/win32/apache-2.0/mod_caucho.dll

NameVirtualHost *

<VirtualHost *>
    ServerName sub.domain.com
    DocumentRoot c:/web
    ResinConfigServer sub.domain.com 6802
</VirtualHost>
+2  A: 

You need to read How the Plugins Dispatch to Resin and explicitly configure the URLs you want to be handled by Resin to be forwarded to Resin:

mod_caucho discovers its configuration by contacting the ResinConfigServer specified in the httpd.conf or resin.ini. The ResinConfigServer can be any Resin server. When a user requests a URL, mod_caucho uses the configuration it has determined from the ResinConfigServer to determine whether Resin or Apache should handle the request. That decision is based on the configuration in the ResinConfigServer's resin.conf.

This means if you want certain URLs to be handled by Resin, you need to configure it this way in your resin.conf.

Eddie
Thanks you - this worked!
BacMan
Glad it helped.
Eddie