I guess I have to answer my own mail again. I didnīt solve it but found 
a workaround by misusing the NewAccount.vm template as anon user.
I simply triggered a HTTP Post request from my servlet with the proper 
parameters and action down to that template and parsed the resulting data.
Not optimal but better than nothing. Deletion and changing the user data 
work more or less like within the Jetspeed system, from outside so no 
HTTP Call is needed there.

Werner



Werner Punz wrote:
> I try to merge jetspeed into an existing system. The problem I have is
> that I have an existing system with a user management and try to add a
> jetspeed user every time a user in the existing JSP system is created.
> 
> I basically figured it out already:
> 
> from my external JSP/Servlet I have to call following:
> 
>   JetspeedUser jsUser = JetspeedSecurity.getUserInstance();
> 
>          String userName = (String)obj.get_clogin();
>                 
> jsUser.setUserName(JetspeedSecurity.convertUserName((String)obj.get_clogin())); 
> 
>          jsUser.setPassword((String)obj.get_cpwd());
> 
>          jsUser.setFirstName((String)obj.get_cvorname());
>          jsUser.setLastName((String)obj.get_cnachname());
> 
>          Date now = new Date();
> 
>          jsUser.setCreateDate(now);
>          jsUser.setLastLogin(now);
>          jsUser.setConfirmed(JetspeedResources.CONFIRM_VALUE);
> 
> 
> 
> 
>          String data = obj.get_cemail();
>          if ((data == null)||(data.trim().equals(""))) data = "";
> 
>          jsUser.setEmail(data);
> 
>          jsUser.setDisabled(false);
> 
> 
> 
>          JetspeedSecurity.addUser(jsUser);
>          jsUser = JetspeedSecurity.getUser(userName);
>          JetspeedSecurity.saveUser(jsUser);
> 
> 
> 
> The problem however is, the user is created, so far all the access
> rights work, but strangely the system doesnīt react as it should. After
> creation I log into my new user and the user itself is recognized,
> however the page not:
> 
> aka, when I link dynamically to this user I just get following link:
> 
> http://localhost:8080/jetspeed/portal/role/user/page/
> 
> However querying the user in the context gives back the correct username
> 
> Also the user itself does exist, but following code working on jetspeed
> generated users doesnīt work on externally generated users:
> 
> $jslink.setTemplate(mytemplate)
> 
> should generate:
> 
> http://localhost:8080/jetspeed/portal/user/myuser/page.....
> 
> instead it generates on externally generated users:
> 
> http://localhost:8080/jetspeed/portal/role/user/page/
> 
> So basically what happens is that the authentication works
> the display of the username as well and also can be referenced if
> accessed directly via a hand entered url
> 
> The user also exists and it shows itself correctly in the admin console
> 
> But $jslink.setTemplate simply puts out bogus data regarding the user
> instead of putting out correct data as it happens if the user is
> generated via the admin console.
> 
> To sum it up I need  expert help. Iīm not really sure what is going
> wrong there.
> 
> Thanks for your help
> 
> Werner Punz
> 
> 
> 
> 
> -- 
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to