webtier@glassfish.java.net

jsp-property-group interferes with FacesServlet by-extension mapping

From: <webtier_at_javadesktop.org>
Date: Mon, 05 Apr 2010 14:35:39 PDT

Hello,
I'm writing a web-app using faces and deploying to GFv2.1.1. In web.xml I have:
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>

I'm trying to [i]template[/i] pages under /book and /pages differently, so I have:
    <jsp-config>
        <jsp-property-group>
            <url-pattern>/pages/*</url-pattern>
            <include-prelude>/WEB-INF/jspf/prelude.jspf</include-prelude>
            <include-coda>/WEB-INF/jspf/coda.jspf</include-coda>
            <trim-directive-whitespaces>true</trim-directive-whitespaces>
        </jsp-property-group>
        <jsp-property-group>
            <url-pattern>/book/*</url-pattern>
            <include-prelude>/WEB-INF/jspf/jsfcrud.jspf</include-prelude>
            <include-coda>/WEB-INF/jspf/coda.jspf</include-coda>
            <trim-directive-whitespaces>true</trim-directive-whitespaces>
        </jsp-property-group>
    </jsp-config>

Now, browsing to [b]http://localhost:8080/web-app/book/List.jsf[/b] fails with a
HTTP 404 Not Found, and the server log shows:
PWC6117: File "D:\Documents and Settings\Opher\My Documents\NetBeansProjects\web-app\build\web\book\List.jsf" not found.

On the other hand, browsing to http://localhost:8080/web-app/faces/book/List.[b]jsp[/b] succeeds.

Also, removing the <jsp-property-group> for /book/*, obviously, causes the first url to work (as is expected).

Is this behavior a BUG or by-design? Have I overlooked anything?

Thanks for any help or suggestion.
Opher.
[Message sent by forum member 'ophers']

http://forums.java.net/jive/thread.jspa?messageID=395378