0 Replies Latest reply: May 12, 2014 2:04 PM by keuller RSS

    How to access a JSF page from a JAR file ?

    keuller
      Hi,

       

      I've split up my JSF application in to 4 modules. I've created 1 module just to provide some basic resources like CSS, JS, images and Facelets templates. This module works fine and I can use all resources inside it, including JSF templates. I've created other one that contains some pages with their managed beans and that module is packaged as a JAR file.
      I would like to know how can I access that pages inside the JAR file like other pages inside my WAR file. I've tried to use with <h:link/> and <h:outputLink/> but I have no success.

       

      If I can try to create a link to the page like that:

       

      <h:link value="Grupo" outcome="grupo_list" /> 
      So when I do that I get this warning message "JSF1090: Navigation case not resolved for component".

       

      Or if I try to create a link to the page like that

       

      <h:outputLink value="#{item.outcome}">#{item.title}</h:outputLink>

      I get this error message "/grupo/list.xhtml Not Found in ExternalContext as a Resource"

      My list.xhtml page is inside META-INF/resources/grupo/list.xhtml and I put faces-config.xml inside META-INF folder as well.

      This is snippet code of the faces-config.xml:
      <navigation-rule>
              <from-view-id>/*</from-view-id>
              <navigation-case>
                  <from-outcome>grupo_list</from-outcome>
                   <to-view-id>/grupo/list.xhtml</to-view-id>
              </navigation-case>
          </navigation-rule>
      
      

      Anyone can help me ?

      Regards.