i try to use the code like below, but failed

  | @PersistenceContext                                                         
         
  | private EntityManager em;
  | 
  | @In Identity identity;
  | .....
  | 
  | public String register(){
  |     .....
  |     em.persist(user);
  |     identity.setUsername(user.getUsername);
  |     identity.setPassword(user.getPassword);
  |     identity.login();
  |     return "/home.seam";
  | }
  | 
  | 

the same question is i try to recieve username and password from a SSO system, 
but failed again when i use identity.login()

  | @RequestParameter private String ssoString;
  | 
  | @Create
  | public sso(){
  |     User user = SSO.parser(ssoString);
  |         if(user.isValid()){
  |             identity.setUsername(user.getUsername);
  |             identity.setPassword(user.getPassword);
  |             identity.login();
  |     }
  |     Redirect redirect = Redirect.instance();
  |     redirect.setViewId("/home.xhtml");
  |     redirect.execute();
  | }
  | 
  | 
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061838#4061838

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061838
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to