facebook

MyFaces web.xml configuration

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #257632 Reply

    Jeremy Stein
    Member

    When I add JSF capabilities to my web project and select MyFaces 1.1.1, the changes to my web.xml file include:

    <filter>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
      <init-param>
        <param-name>maxFileSize</param-name>
        <param-value>20m</param-value>
      </init-param>
    </filter>
    <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <url-pattern>*.faces</url-pattern>
    </filter-mapping>

    That particular filter-class is deprecated.

    Also, I would suggest mapping the filter to the Faces Servlet rather than to the URL pattern. This would allow me to change the URL pattern for JSF in just on place.

    These changes (plus an additional filter mapping to /faces/myFacesExtensionResource/*) appear to be the suggested web.xml configuration from Apache: http://myfaces.apache.org/tomahawk/extensionsFilter.html

    #257754 Reply

    Riyad Kalla
    Member

    Great suggestions, all of them have been filed.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: MyFaces web.xml configuration

You must be logged in to post in the forum log in