cancel
Showing results for 
Search instead for 
Did you mean: 

Get user id from portal and pass it thru asp

Former Member
0 Kudos

Hello,

Is there anyway we can get the user id from portal and pass it as querystring to asp pages. I know we can get the userid from IPortalComponentRequest object (Abstract portal component) As soon we get the user id i want to redirect to asp

IUser user = request.getUser();

String user_id = user.getUserid();

Immediately i want the abstractportal component to redirect to asp, the id will be passed as querystring

Or Is it possible to write a jsp as wrapper (Not portal components) to get the user id of portal so that i can forward the request to asp pages

Help is greatly appreciated

Thanks,

Lak

Accepted Solutions (1)

Accepted Solutions (1)

raj_balakrishnan3
Participant
0 Kudos

You can use do a response.sendRedirect to the asp page with the userid as part of the query string or put the asp page into a IsolatedHTMLContainer

IsolatedHtmlContainer ihc = new IsolatedHtmlContainer("");

ihc.setSrcURL("<put url here>.asp?userid="+userID);

You can use a jsp page too, to redirect.

Regards

Raj

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Raj,

Thank you very much for the answer. I have already full points. I am just curious to know whether isolatedhtml control can be used with abstactportal component ( Since it is htmlb component i am not able to use it in abstract portal component) Am i right ??? Also can you please let me how to use only JSP to forward the userid to asp. ( I mean How to get the userid of portal using JSP, iam typecasting request object to IPortalComponentRequest to get the userid and it is not compiling)

Thanks again

Lak

Former Member
0 Kudos

This is how you get UserID in portal,

Java:

String portalUser = request.getUser().getUniqueName();

(Or) JSP:

<%String portalUser =componentRequest.getUser().getUniqueName();%>

Regards,

P.

Former Member
0 Kudos

Dear Mhadi Peter,

Our company use the Enterprise Portal. (EP620 SP2 Patch31)

I want to get User ID logged in the Portal.

Could you give me the JAVA and JSP source ?

Regards,

Eric (queerduck@hanmail.net)