3 Replies Latest reply on Jan 28, 2010 8:21 PM by Stephanie Stroka

    Losing FacesContext through RESTful webservice

    Stephanie Stroka Newbie

      Hello everyone,


      I got the following problematic situation:


      I have implemented a RESTful webservice that is triggered by a remote authentication server and which is responsible to log in a user if the signature of the remote server is validated.
      The problem that I have is that my pages.xml does not react on the login event:


      Java code snippet inside of the webservice:



      Identity.instance().login();
      if(Identity.instance().isLoggedIn()) {
          // this works
          log.debug("User #0 has logged in", user.getLogin());
      }





      pages.xml:



      <navigation from-action="#{identity.login}">
          <rule if="#{identity.loggedIn}">
              <end-conversation before-redirect="true"/>
              <redirect view-id="/dashboard/home.xhtml"/>
          </rule>
      </navigation>





      Furthermore, FacesContext.getCurrentInstance() returns null. Does anyone know why? How can I alternatively redirect to another seam page? I'd be very glad about tipps and helpful comments!


      Thanks, Stephanie