[ http://issues.apache.org/jira/browse/TOMAHAWK-823?page=comments#action_12459532 ] Gary VanMatre commented on TOMAHAWK-823: ----------------------------------------
The filter extension has two modes. 1) The components that require script call a utility that ends up queuing up the javascript. The filter intercepts the response and injects the javascript in the document header. This task, adding script to the header, is associated with the first filter mapping. The mapping must match the faces servlet mapping. So if you are using *.faces, I believe you will need the same mapping for the filter extension. 2) The second filter mapping pulls down the javascript to the browser. The javascript added to the header as a src that the second filter intercepts "/faces/*. The document header should contain common script that is used by the script fragments rendered by the components. <script type="text/javascript" src="/shale-clay-mailreader/faces/extensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11664983/navmenu.jscookmenu.HtmlJSCookMenuRenderer/JSCookMenu.js;jsessionid=6E269EEF72A2EFF9CBBA46C67E1C5827"> You might check your faces servlet mapping and make sure the filter matches. I'd also check the document header to see if you have the javascript. Are you using JSP or Facelets? > ExtensionsFilter not working > ---------------------------- > > Key: TOMAHAWK-823 > URL: http://issues.apache.org/jira/browse/TOMAHAWK-823 > Project: MyFaces Tomahawk > Issue Type: Bug > Components: JS Cook Menu > Affects Versions: 1.1.3 > Environment: Application server: Apache Tomcat/5.5.16, WinXP > Professional > Reporter: Gabriel Enriquez > > I've been trying to use the jscookMenu as following, > <h:form> > <t:jscookMenu layout="hbr" theme="ThemeOffice"> > <%/* Availaible jscookMenu themes: ThemeIE, > ThemeMiniBlack,ThemeOffice, ThemePanel > Availaible jscookMenu layout: hbr, hbl, hur, hul, vbr,vbl, > vur, vul > respect to Heng Yuan > http://www.cs.ucla.edu/~heng/JSCookMenu > */%> > <t:navigationMenuItems value="#{appMenuBean.navItems}" > /> > </t:jscookMenu> > </h:form> > then getting the next exception: > java.lang.IllegalStateException: ExtensionsFilter not correctly configured. > JSF > mapping missing. JSF pages not covered. Please see: > http://myfaces.apache.org/to > mahawk/extensionsFilter.html > ... > I already checked my web.xml to make sure is as the documentation (i removed > others for brevity): > ... > <context-param> > <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name> > <param-value>true</param-value> > </context-param> > ... > <filter> > <filter-name>MyFacesExtensionsFilter</filter-name> > > <!--filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class--> > > <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class> > <init-param> > <param-name>maxFileSize</param-name> > <param-value>20m</param-value> > <description>Set the size limit for uploaded files. > Format: 10 - 10 bytes > 10k - 10 KB > 10m - 10 MB > 1g - 1 GB > </description> > </init-param> > </filter> > ... > <filter-mapping> > <filter-name>MyFacesExtensionsFilter</filter-name> > <url-pattern>/faces/myFacesExtensionResource/*</url-pattern> > </filter-mapping> > > <filter-mapping> > <filter-name>MyFacesExtensionsFilter</filter-name> > <servlet-name>Faces Servlet</servlet-name> > </filter-mapping> > ... > <servlet> > <servlet-name>Faces Servlet</servlet-name> > <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> > <load-on-startup>1</load-on-startup> > </servlet> > <servlet-mapping> > <servlet-name>Faces Servlet</servlet-name> > <url-pattern>*.jsf</url-pattern> > </servlet-mapping> > ... > I have tried both: > org.apache.myfaces.webapp.filter.ExtensionsFilter AND > org.apache.myfaces.component.html.util.ExtensionsFilter > BUT either working. > Also, > with this context parameter: > org.apache.myfaces.CHECK_EXTENSIONS_FILTER set to true, i got the exception > previously mentioned. > If I set to false, I get a JS error on the client. > I am using: > myfaces-core-1.1.4 > tomahawk-1.1.3 > myfaces-impl-1.1.4.jar -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
