You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Gabriel Enriquez (JIRA)" <de...@myfaces.apache.org> on 2006/12/18 21:14:21 UTC

[jira] Created: (TOMAHAWK-823) ExtensionsFilter not working

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

        

[jira] Commented: (TOMAHAWK-823) ExtensionsFilter not working

Posted by "Gabriel Enriquez (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-823?page=comments#action_12459734 ] 
            
Gabriel Enriquez commented on TOMAHAWK-823:
-------------------------------------------

I am using JSP.

Actually the 2nd issue (regarding the JS error), is becuase:
There is clashing my layout framework (sitemesh) with the extensions filter.
When I disabled the layout framework, it worked!

I haven't gone deep what is the essential issue, nevertheless both (layout manager & extensionsFilter) are using filters.
There is something there!

Thanks for your great help,

Gabriel

> 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

        

[jira] Commented: (TOMAHAWK-823) ExtensionsFilter not working

Posted by "Gabriel Enriquez (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-823?page=comments#action_12459515 ] 
            
Gabriel Enriquez commented on TOMAHAWK-823:
-------------------------------------------

Hey Gary,

Thanks for the tip. It seems that there is some progress on it.

The exception is not thrown anymore with that. Thanks again!

But still not able to render the menu properly;
not it appears a js error:
Error: cmThemeOffice is not defined

And looking at the cliend code, I do not see any .js resource for that variable.

Do you have any idea what is going on?

Thanks again,
Gabriel




> 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

        

[jira] Resolved: (TOMAHAWK-823) ExtensionsFilter not working

Posted by "Gabriel Enriquez (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-823?page=all ]

Gabriel Enriquez resolved TOMAHAWK-823.
---------------------------------------

    Fix Version/s: 1.1.3
       Resolution: Fixed

Order of the filter-mapping affects when used with other frameworks.

Just remember the response has to had HEADER element when extensionsFilter is invoked.

Thanks,
Gabriel

> 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
>             Fix For: 1.1.3
>
>
> 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

        

[jira] Commented: (TOMAHAWK-823) ExtensionsFilter not working

Posted by "Gabriel Enriquez (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-823?page=comments#action_12459781 ] 
            
Gabriel Enriquez commented on TOMAHAWK-823:
-------------------------------------------

ok. finally it's working.

The problem was that the filter-mapping order affects.

The reason:
extensionsFilter  -> adds the resources at the header in the html document.

And becuase sitemesh was invoked at the end, such (HEADER) element did not exist.

Gabriel

> 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

        

[jira] Commented: (TOMAHAWK-823) ExtensionsFilter not working

Posted by "Gary VanMatre (JIRA)" <de...@myfaces.apache.org>.
    [ 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

        

[jira] Commented: (TOMAHAWK-823) ExtensionsFilter not working

Posted by "Gary VanMatre (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-823?page=comments#action_12459500 ] 
            
Gary VanMatre commented on TOMAHAWK-823:
----------------------------------------

I've seen this error on a jsp forward from a welcome page.  

<jsp:forward page="/index.jsf"/>

I added the dispatcher (Servlet 2.4) to the filter definition so that the filter would be invoked on a forward.   It seems to fix my problem but I didn't dig into what the filter was unhappy about.

You might try:

<filter-mapping>
   <filter-name>extensionsFilter</filter-name>
   <url-pattern>*.jsf</url-pattern>
   <dispatcher>REQUEST</dispatcher>
   <dispatcher>FORWARD</dispatcher>
</filter-mapping>
<filter-mapping>
   <filter-name>extensionsFilter</filter-name>
   <url-pattern>/faces/*</url-pattern>
   <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>


> 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