@Name("loggedUser") public class LoggedUser { @In(required=true) Long loggedUserId; @In Session hibernateSession; @Unwrap public User getLoggedUser() { return (User) hibernateSession.load(User.class, loggedUserId); } }
<factory name="rootUrl" scope="EVENT" value="#{facesContext.externalContext.requestContextPath}"/>