Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-8687

JSF tooling adds an Faces Servlet declaration with no servlet mappings on project import

    Details

    • Steps to Reproduce:
      Hide

      Duplicate by creating a project from the JBoss Java EE 6 webapp archetype (http://tinyurl.com/gojavaee) and import it as a Maven project. Make sure you have the JBoss Tools auto-detection support for JSF installed. You'll see that the web.xml is overwritten...but was fine how it was.

      Show
      Duplicate by creating a project from the JBoss Java EE 6 webapp archetype ( http://tinyurl.com/gojavaee ) and import it as a Maven project. Make sure you have the JBoss Tools auto-detection support for JSF installed. You'll see that the web.xml is overwritten...but was fine how it was.
    • Workaround Description:
      Hide

      Remove the Faces Servlet declaration after JSF configurator adds it.

      Show
      Remove the Faces Servlet declaration after JSF configurator adds it.

      Description

      When importing a Java EE 6 webapp that contains a faces-config.xml descriptor, the JSF tooling unnecessarily adds a Faces Servlet declaration to the web.xml. The Faces Servlet is not required in Java EE 6 (at least on JBoss AS and GlassFish). What's worse, the Servlet is added with no mappings, so it completely breaks JSF.

        Gliffy Diagrams

          Activity

          Hide
          snjeza Snjezana Peco added a comment -

          I can't reproduce the issue either using the JBT 3.3.0 trunk or JBT 3.2 stable branch.

          The Maven JSF Configurator isn't called if a project already contains the JSF facet.
          If you want to reproduce the problem using an existing project, you need to do the following:

          • check the "web.xml for JSF 2.0 facet" preference
          • right click the project and call Properties>Project Facets
          • delete the JSF facet
          • right-click the project and call Maven>Update Project Configuration

          or

          • create a new project using the jboss-jee6-webapp archetype
          • check the "web.xml for JSF 2.0 facet" preference
          • import the project using the Import>Existing Maven Projects action

          If after these steps the web.xml is still unchanged (no servlet definition is added to it), please reopen this jira.

          Show
          snjeza Snjezana Peco added a comment - I can't reproduce the issue either using the JBT 3.3.0 trunk or JBT 3.2 stable branch. The Maven JSF Configurator isn't called if a project already contains the JSF facet. If you want to reproduce the problem using an existing project, you need to do the following: check the "web.xml for JSF 2.0 facet" preference right click the project and call Properties>Project Facets delete the JSF facet right-click the project and call Maven>Update Project Configuration or create a new project using the jboss-jee6-webapp archetype check the "web.xml for JSF 2.0 facet" preference import the project using the Import>Existing Maven Projects action If after these steps the web.xml is still unchanged (no servlet definition is added to it), please reopen this jira.
          Hide
          vpakan Vlado Pakan added a comment -

          I'm not able to import properly J2EE project https://issues.jboss.org/browse/JBIDE-9083.

          I'm using JBT 3.3.0.M1 http://download.jboss.org/jbosstools/updates/JBossTools-3.3.0.M1a/

          Which version of JBT and Eclipse are you using Snjezana?

          Show
          vpakan Vlado Pakan added a comment - I'm not able to import properly J2EE project https://issues.jboss.org/browse/JBIDE-9083 . I'm using JBT 3.3.0.M1 http://download.jboss.org/jbosstools/updates/JBossTools-3.3.0.M1a/ Which version of JBT and Eclipse are you using Snjezana?
          Hide
          vpakan Vlado Pakan added a comment -

          JBT 3.2.1 CR1 is working correctly. Installed from http://download.jboss.org/tools/updates/JBossTools-3.2.1.CR1

          Show
          vpakan Vlado Pakan added a comment - JBT 3.2.1 CR1 is working correctly. Installed from http://download.jboss.org/tools/updates/JBossTools-3.2.1.CR1
          Hide
          vpakan Vlado Pakan added a comment -

          Then Fix Version of this Jira should be changed? I'm not able to verify it with JBT 3.3.0.M1 although reason is not this Jira.

          Show
          vpakan Vlado Pakan added a comment - Then Fix Version of this Jira should be changed? I'm not able to verify it with JBT 3.3.0.M1 although reason is not this Jira.
          Hide
          vpakan Vlado Pakan added a comment -

          Verified on jbdevstudio-product-linux-gtk-5.0.0.v201106241117R-H14-M2.

          Show
          vpakan Vlado Pakan added a comment - Verified on jbdevstudio-product-linux-gtk-5.0.0.v201106241117R-H14-M2.

            People

            • Assignee:
              snjeza Snjezana Peco
              Reporter:
              dan.j.allen Dan Allen
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development