javaeetutorial
  1. javaeetutorial
  2. JAVAEETUTORIAL-268

Copyright header in XHTML files is sometimes inserted as the first line

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 7.0.4
    • Fix Version/s: 7.0.5
    • Component/s: examples
    • Labels:
      None

      Description

      For whatever reason, the license plugin for Maven sometimes inserts the copyright notice above the <?xml ... ?> header, which breaks JSF pages. The XML header has to be the first line of the file. The template.xhtml files appear to be affected more than others for mysterious reasons.

      See, e.g., examples/persistence/address-book/src/main/webapp/template.xhtml in the latest bundle:

      <!--
      
          Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
      
          You may not modify, use, reproduce, or distribute this software except in
          compliance with  the terms of the License at:
          http://java.net/projects/javaeetutorial/pages/BerkeleyLicense
      
      -->
      <?xml version='1.0' encoding='UTF-8' ?> 
      <!--
      
          Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
      
          You may not modify, use, reproduce, or distribute this software except in
          compliance with  the terms of the License at:
          http://java.net/projects/javaeetutorial/pages/BerkeleyLicense
      
      -->
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      ...
      

      Out of the box, you'll get runtime errors. Removing the first copyright header allows the app to run correctly.

        Activity

        Hide
        Kim Haase added a comment -

        We did a sweep and fixed these problems.

        Show
        Kim Haase added a comment - We did a sweep and fixed these problems.

          People

          • Assignee:
            Kim Haase
            Reporter:
            Ian Evans
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: