View Full Version : Turning on Quercus disables SSI?

08-11-2009, 10:36 PM
I am using Resin 4.0.0 and my WEB-INF/resin-web.xml is as attached. I've recently started development of a web application. I started off with just designing some HTML and javascript so I initially was using just server-side includes. I recently added the server tag to enable PHP code in my files and when I did so the SSI stopped working: the SSI instructions are apparently simply unparsed and make it through to the web browser.

Does this make sense? I.e., is this the expected behavior? Is there something I can do to get them both working at the same time?


08-12-2009, 09:18 PM
Your servlet mappings are not correct. Both of them have extra <url-pattern> tags matching the same pages, like *.htm. Only one can match, and normally the PHP should only match *.php anyway.

Also, it's a little odd to match *.html and *.js as SSI or PHP. Is that what you intended to configure?

08-15-2009, 07:43 PM
Yes, I intended to configure it that way. I have both SSI commands and PHP code within my javascript and HTML files as well as the other file types. With javascript, for example, it's faster performance-wise to include multiple .js files within each other with SSI than to have the client perform multiple separate HTTP requests for all the files.

Hmmmm... I tried creating separate servlet-mapping tags for each file extension but that doesn't seem to have worked either. Is it only possible to have a single file extension parsed as PHP? Pardon me if there's something related to Java I'm not understanding; I'm not normally a Java guy but Quercus looked good enough to try out.

Also, is there a DocType or Schema or RelaxNG spec file available for the resin-web.xml?

08-17-2009, 09:11 PM
SSI commands and PHP cannot be used together on Resin for a single request. This is because SSI and PHP are both implemented as servlets. Only one servlet will be given the request, depending on the servlet mapping.

I think your best bet is to do the includes from PHP, as opposed to doing it with SSI.

08-18-2009, 12:43 AM
So there's nothing along the lines of Apache InputFilters and OutputFilters and FilterChains?

In any case thank you, guys, for responding.

08-18-2009, 12:46 AM
Actually - do Apache filters work at all when Resin is set up to work in combination with Apache? If so perhaps I could rig up something that way...

10-07-2009, 01:51 AM
From my understanding, the Apache filters should work.