Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2012-11-20T21:44:10Z by Jacek_Laskowski
Jacek_Laskowski
Jacek_Laskowski
133 Posts
ACCEPTED ANSWER

Pinned topic How to have jsf-2.0 feature added automatically upon deployment?

‏2012-11-20T13:05:44Z |
Hi,

This is for the 8.5.0.1 release.

I work with JSF and OSGi in a WAB and my experience shows that I need to add the jsf-2.0 feature explicitly before the app runs so no errors related to FacesServlet CNFE show up.

I wonder what triggers the jsf-2.0 feature to be added to server.xml upon deployment? Is there anything? Why is selecting the JSF facet in Eclipse and having the FacesServlet in web.xml not enough to have it processed automatically? Is there anything I can use in my webapp to have the jsf-2.0 feature added?

Although I found that adding javax.faces.webapp.* package as Imported Package to MANIFEST.MF triggers the addition, I don't even want to do this (as it appears too low-level when Eclipse's used as the IDE).

Any tips or pointers appreciated.

Jacek
Japila :: verba docent, exempla trahunt
  • SystemAdmin
    SystemAdmin
    590 Posts
    ACCEPTED ANSWER

    Re: How to have jsf-2.0 feature added automatically upon deployment?

    ‏2012-11-20T16:22:28Z  in response to Jacek_Laskowski
    Hello,

    I did a quick test and it worked for me. I created an OSGi bundle with web support in an OSGi application. I added a html file to the bundle. Then I added the JSF 2.0 facet to the bundle project from the project properties. When I published the application to the server, the jsf-2.0 feature is added to the server.xml automatically.

    Are you not seeing this or I misunderstood your question?

    Thanks.
    • Jacek_Laskowski
      Jacek_Laskowski
      133 Posts
      ACCEPTED ANSWER

      Re: How to have jsf-2.0 feature added automatically upon deployment?

      ‏2012-11-20T21:44:10Z  in response to SystemAdmin
      Hi,

      That's exactly what I'm after, but can't seem to get it going. Let me give it a go again and report back with the results. Thanks for checking it out for me. I knew LP could do it, but turns out I wasn't patient enough.

      Jacek
      Japila :: verba docent, exempla trahunt