Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-1991

Example's bad faces-config.xml causes NullPointerException in ContentTypeAndCharacterSet

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0-alpha-2
    • 2.0.0-beta-1
    • None
    • None

    Description

      The file trinidad-2.0.0-alpha-2-example.tar.gz\trinidad-2.0.0-alpha-2\trinidad-blank-2.0.0-alpha-2.war\WEB-INF\faces-config.xml starts like this:

      <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_0.dtd" >
      <faces-config>

      Which causes an error like this:

      java.lang.NullPointerException
      at org.apache.myfaces.trinidadinternal.config.dispatch.ContentTypeAndCharacterSet.<init>(ContentTypeAndCharacterSet.java:42)
      at org.apache.myfaces.trinidadinternal.config.dispatch.DispatchServletResponse.setContentType(DispatchServletResponse.java:39)
      at javax.servlet.ServletResponseWrapper.setContentType(ServletResponseWrapper.java:133)

      When i start faces-config.xml like this:
      <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
      http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
      version="2.0">

      it works

      Tested on appengine dev environment with jsf-api.jar and jsf-impl-gae.jar from oracle

      Attachments

        Activity

          People

            matzew Matthias Wessendorf
            harkanlangbaard Harkan Langbaard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: