• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Tomahawk1.1.3 ugrade exception...ExtensionsFilter not correctly configured. JSF mappi

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Experts,

I new to the world of JSF and im presently playing around with MyFaces Tomhawk implementation.
I tried the tree example using tomahawk.jar ,myfaces-api and myfaces-impl.

I was able to get the tree working with these version of jars.



But now when i upgraded to the latest jars i.e
myfaces-api 1.1.3
myfaces-imple1.1.3 and
tomahawk-1.1.3



I'm getting the following error...see the stack trace below:



java.lang.IllegalStateException: ExtensionsFilter not correctly configured. JSF mapping missing. JSF pages not covered. Please see: http://myfaces.apache.org/tomahawk/extensionsFilter.html
org.apache.myfaces.renderkit.html.util.AddResourceFactory.throwExtensionsFilterMissing(AddResourceFactory.java:371)
org.apache.myfaces.renderkit.html.util.AddResourceFactory.checkEnvironment(AddResourceFactory.java:333)
org.apache.myfaces.renderkit.html.util.AddResourceFactory.getInstance(AddResourceFactory.java:288)
org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeJavascript(HtmlTreeRenderer.java:611)
org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeBegin(HtmlTreeRenderer.java:152)
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:512)

I googled for this also did the required changes.
here are the links i visited.
1) http://wiki.apache.org/myfaces/Upgrading_to_Tomahawk_1.1.3


2) http://www.mail-archive.com/users@myfaces.apache.org/msg23110.html


3) http://www.mail-archive.com/users@myfaces.apache.org/msg23094.html





Here's my web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>

<context-param>
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
<param-value>false</param-value>
</context-param>

<context-param>
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>true</param-value>

</context-param>

<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>

<!-- The following listener is needed when using the Apache MyFaces
JSF implementation -->

<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

<!-- Extensions Filter -->
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>

<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>maxFileSize</param-name>
<param-value>20m</param-value>
</init-param>
</filter>

<!-- 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 -->
<url-pattern>*.jsp</url-pattern>
</filter-mapping>

<!-- 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>
<!-- Extensions Filter -->

<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>*.faces</url-pattern>
</servlet-mapping>
</web-app>




Please help me out in fixing this exception.....im sure lot of people must have encountered this exception.



Thanks

Ved
 
Ranch Hand
Posts: 581
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Ved,

I saw duplicated filter mapping in your web.xml file. See here:


Maybe you could try to delete the first mapping and keep the second one. In my app I configured the mapping like the second mapping, it works flawlessly.


HTH,
Ellen
reply
    Bookmark Topic Watch Topic
  • New Topic