Mantis - Resin
Viewing Issue Advanced Details
2486 minor always 03-03-08 12:44 03-20-08 16:04
sam  
ferg  
urgent  
closed 3.1.5  
fixed  
none    
none 3.1.6  
0002486: Jsp dependency on path-mapping file does not correctly cause a recompile
(rep by L Geller)

Switching from 3.1.3 to 3.1.5, I am seeing that sometimes changes in JSP
includes are not picked up and recompiled.

Below code and config should illustrate the issue. Making changes to
the inc in the map dir will not be picked up unless the work dir is
deleted or the runtime restarted.

===== ./resin_test.conf:

<resin xmlns="http://caucho.com/ns/resin" [^] xmlns:resin="http://caucho.com/ns/resin/core"> [^]
    <cluster id="app-tier">
        <server-default>
            <http port="80"/>
        </server-default>
         <server id="a" address="localhost" port="6803"/>

        <web-app-default>
            <class-loader>
                <compiling-loader path="WEB-INF/classes"/>
                <library-loader path="WEB-INF/lib"/>
            </class-loader>
        
            <servlet servlet-name="resin-jsp" servlet-class="com.caucho.jsp.JspServlet">
                <init>
                    <load-tld-on-init>false</load-tld-on-init>
                    <page-cache-max>4096</page-cache-max>
                </init>
                <load-on-startup/>
            </servlet>
            <servlet servlet-name="resin-file" servlet-class="com.caucho.servlets.FileServlet"/>
            <servlet-mapping url-pattern="*.jsp" servlet-name="resin-jsp"/>
            <servlet-mapping url-pattern="/" servlet-name="resin-file"/>
            <mime-mapping extension=".html" mime-type="text/html"/>
        </web-app-default>
        
        <host id="">
            <document-directory>c:/tmp/root</document-directory>
            <web-app id="/">
                <path-mapping url-pattern='/skins/*' real-path='c:/tmp/map'/>
            </web-app>
        </host>
    </cluster>
</resin>


===== ./map/inc.jsp:

<%
out.println("inc is in mapped skin dir map!");
%>


===== ./root/inc.jsp:

<%
out.println("inc is in curr dir tmp!");
%>


===== ./root/foo.jsp:

<%
out.println("Testing include files!
");

try {
    pageContext.include("/skins/inc.jsp");

    pageContext.include("inc.jsp");
} catch (Exception e) {
    out.println("could not include: " + e + "
");
}



Notes
(0002866)
ferg   
03-20-08 16:04   
jsp/15j6