Skip to Content
0
Former Member
Feb 25, 2005 at 12:07 PM

Creating a ResourceContext with a user

23 Views

Hi,

I'm triyng to instantiate a ressource context with the current user.

I tried to proceed the following way :

com.sap.security.api.IUser nwUser;
nwUser = request.getUser();
IResourceContext resourceContext = (IResourceContext)new ResourceContext(nwUser);

But it seems the ResourceContext constructor needs a different IUSer. (com.sapportals.portal.security.usermanagement.IUser)

So i tried to convert the user with

com.sapportals.portal.security.usermanagement.IUser user = WPUMFactory.getUserFactory().getEP5User(nwUser);

But this leads to an error a the execution of my servlet on the portal.

I use EP6.0 SP9.

Is there another way to get the current user in a servlet and then instanciate a resourceContext from it ?

Thanks

Sylvain

Message was edited by: Sylvain