Project and Portfolio Management Practitioners Forum
cancel

calling getRemoteUser in a custom JSP

Highlighted
Cenk Oguz
Respected Contributor.

calling getRemoteUser in a custom JSP

I am trying to write a simple custom JSP in PPM, placing it within itg.war web application.

However I need to resolve the logged in user. Usually the logged in user is resolved by a call to the HttpServletRequest.getRemoteUser() method.

However I noticed that when the getRemoteUser method is called in a JSP from itg.war, it returns null, and when called from a jsp within dashboard.war it successfully gets the userId of logged in user.

Anyone have any idea why this is?

BR,
Cenk
4 REPLIES
Cenk Oguz
Respected Contributor.

Re: calling getRemoteUser in a custom JSP

I managed to sort this one out. The user_id in a JSP from itg.war can be obtained though a session attribute called "com.mercury.dashboard.userid".

Although it implies the itg.war application does not use standard J2EE authentication but rather relies on having this attribute set by the dashboard.war web application.

BR,
Cenk

Cenk Oguz
Respected Contributor.

Re: calling getRemoteUser in a custom JSP

closed.
PPM Admin
Respected Contributor.

Re: calling getRemoteUser in a custom JSP

Hi Cenk,

Can you provide us/me a sample coding that you have done on this?

Thanks,
Chona
Cenk Oguz
Respected Contributor.

Re: calling getRemoteUser in a custom JSP

It has been a while and don't have the code, but using a simple scriptlet below should do the trick to get the actual userid as a string.

<%= session.getAttribute("com.mercury.dashboard.userid") %>

BR,
Cenk