You're making it harder than it has to be :)

There are two required mappings.

One has to be absolute and has to look exactly like this.  It should
probably be your first filter-mapping for performance reasons.   (I
had assumed you'd copied it verbatim, but I see that's now not the
case).

<!-- extension mapping for serving page-independent resources
(javascript, stylesheets, images, etc.)  -->
<filter-mapping>
   <filter-name>MyFacesExtensionsFilter</filter-name>
   <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>

The second mapping must match your Faces servlet mapping.

The easiest way to do that is to use:

<!-- extension mapping for adding <script/>, <link/>, and other
resource tags to JSF-pages  -->
<filter-mapping>
   <filter-name>MyFacesExtensionsFilter</filter-name>
   <!-- servlet-name must match the name of your
javax.faces.webapp.FacesServlet entry -->
   <servlet-name>Faces Servlet</servlet-name>
</filter-mapping>


Your best bet is to literally copy these settings from the web page
and add them to your web.xml file exactly as they appear.   As long as
your servlet name and facelets name are the same elsewhere (which they
appear to be), that's all that's required.

Reply via email to