[jboss-user] [JBoss Seam] - how can login automatically after register?
chibi
do-not-reply at jboss.com
Mon Jul 9 04:33:09 EDT 2007
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
More information about the jboss-user
mailing list