I've been trying to deploy a grails webapp under Resin for a whole  
day now.  I was finally able to get it working, but it brings up an  
interesting behavior for mod_caucho.

Grails URLs looks like this: /controller/action/1/pathinfo?params

I am using Apache+Resin to do this.

Under normal circumstances (ie. running a servlet engine by itself),  
Resin would have no problem running grails and requests are being  
processed by Resin directly.  However, under Apache+Resin setup, I am  
getting 404's.  The reason is because mod_caucho is not recognizing  
the grail URL as an URL that needs to be processed by Resin.  Thus,  
Apache simply considers it a physical directory and tries to access  
the file system.  The result is a 404.

Here's the thing.  Grails' web.xml has filter mappings for the url- 
pattern of "/*".  One of the filters, the UrlMapper, will actually  
process the URL and then dispatch the request to the proper  
controller and action to process the request.

However, there is no servlet mapping that is mapped to pass all "/"  
requests to resin for processing.  Thus, mod_caucho simply assumes  
that requests should not be passed to resin for processing.

To get this working, I actually added a "SetHandler caucho-request"  
to my .htaccess file under the webapp directory.  Now, the requests  
are passed over to resin for processing.

Should mod_caucho be enhanced to also look at filter mappings in the  
web.xml?  If there exists filters mapped to "/*", then mod_caucho  
should delegate the request to resin automatically.  I'm not sure if  
this is a good idea, but I wonder if this should be the case (or a  
setting to enable).


resin-interest mailing list

Reply via email to