PHP include() resembles the JSP include directive
<%...@include file="foo.jsp" %>
which includes the referenced file assuming it contains source code that 
should also be parsed/compiled together with the current script.

What you want is the PHP equivalent of <jsp:include /> which sends a 
request to the file and includes the response into the response of the 
current script (see
I don't know whether PHP supports such a feature out of the box, nor if 
Quercus has implemented it.


Aaron Freeman wrote (2010-08-12 18:19):
> The silence is deafening, so I guess I was completely wrong-headed in
> thinking you could call a .jsp as in include from a .php?
> Bummer, I was hoping that was part of the benefit of having php-based
> apps running under full blown Resin, instead of Quercus in stand alone mode.
> Thanks,
> Aaron
> On 8/12/2010 1:36 AM, Aaron Freeman wrote:
>> I was thinking it's possible to do something like this in a php file:
>> <?php
>>            if((include '../www/_header.jsp') == 'OK') {
>>                    echo 'OK';
>>            }
>> ?>
>> Where the www folder has a path-mapping entry in the resin.xml.
>> It includes the file, but the file isn't processed by the JSP engine, so
>> I literally see strings like "${param.var}" in the output of the call to
>> test.php.  How do I include a .jsp in from a .php but get the JSP engine
>> to process it before it returns?  I know I could do something like:
>> include( 'http://..../www/_header.jsp')
>> but then cookies are lost as the client is the php engine, not the browser.
>> Is it possible to reuse the JSP code from within the PHP environment?
>> Is there a link someone could shoot me that explains this?
>> Thanks,
>> Aaron

resin-interest mailing list

Reply via email to