[EMAIL PROTECTED] wrote:

Simon Kitching <[EMAIL PROTECTED]> wrote on 01/08/2006 04:57:59 PM:

 >
 > The code that processes queued resources and actually modifies the
 > generated page to include them is the ExtensionsFilter. If you don't
 > have this filter mapped for "*.jsf" then that would explain your problem.
 >
 >    <filter-mapping>
 >      <filter-name>extensionsFilter</filter-name>
 >      <url-pattern>*.jsf</url-pattern>
 >    </filter-mapping>
 >

Simon, shouldn't there be entries for url-patterns *.faces as well as for /faces/*?

That depends. URLs of form "/faces/myFacesExtensionResource/*" are generated by the AddResource class only when the resource referenced is stored within a jarfile in the classpath.

So adding
  <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
  </filter-mapping>
is necessary if you are using any tomahawk custom components that serve resources (javascript etc) from within the jarfile. And necessary if you're using
  AddResource.addJavaScriptAtLocation
to point back at a resource within a jarfile in your webapp.

But it's not necessary if you just want to use method
  AddResource.addJavaScriptAtLocation
to insert a reference to a file held within your own webapp that is *not* in a jar.

Regards,

Simon

Reply via email to