myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kienenberger <mkien...@gmail.com>
Subject Proposal: change suggested MyFaces extension mapping examples and docs
Date Wed, 21 Dec 2005 17:14:33 GMT
Currently extensionsFilter.xml suggests the following configuration information:

<filter-mapping>
	<filter-name>MyFacesExtensionsFilter</filter-name>
	<url-pattern>*.jsf</url-pattern>
</filter-mapping>

<filter-mapping>
	<filter-name>MyFacesExtensionsFilter</filter-name>
	<url-pattern>/faces/*</url-pattern>
</filter-mapping>

I'd like to propose that we change it to the following two mappings instead:

 <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
  </filter-mapping>

The above mapping will work with any FacesServlet mapping, provided
they've named it "Faces Servlet"  (I'll add a note pointing out the
importance of matching the name in the docs).

  <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <url-pattern>/faces/myFacesExtensionResource*</ url-pattern>
  </filter-mapping>

The above mapping will eliminate the confusion that users only need to
set the mapping to be whatever they've mapped their Faces Servlet to. 
The full path is already specified in AddResource, so there's no
reason not to put it into the mapping as well.  My only question on
this one is if the mapping should have a trailing slash or not.  I'm
guessing it shouldn't, but I'm no mapping expert.

/faces/myFacesExtensionResource*
 or
/faces/myFacesExtensionResource/*

    private static final String RESOURCE_VIRTUAL_PATH =
"/faces/myFacesExtensionResource";

Anything I'm overlooking?

Mime
View raw message