jQuery in Action, 2nd edition*
The moose likes Portals and Portlets and the fly likes WSRP between WebLogic and WebSphere, getUserPrincipal is null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "WSRP between WebLogic and WebSphere, getUserPrincipal is null" Watch "WSRP between WebLogic and WebSphere, getUserPrincipal is null" New topic

WSRP between WebLogic and WebSphere, getUserPrincipal is null

kiran srilanka

Joined: Apr 29, 2014
Posts: 1

I am trying to implement wsrp between weblogic and websphere where weblogic 10.3.4 is the producer and websphere 6.1 is the consumer. I have created weblogic portlet which displays the logged in user details like remote user, authentication type princpal name.
When i consume the portlet through websphere portal admin console, getting the remote user name and authentication type as FORM but the principal name is returning null.

Here is my producer portlet code:

package com.demo.portal.portlet.supersnoop;

import java.io.IOException;
import java.io.PrintWriter;

import javax.portlet.GenericPortlet;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;

* SuperSnoopPortlet
public class SuperSnoopPortlet extends GenericPortlet implements Version{

* @see javax.portlet.GenericPortlet#doView(RenderRequest, RenderResponse)
protected void doView(RenderRequest req, RenderResponse resp) throws PortletException, IOException {

PrintWriter out = new PrintWriter(resp.getWriter());

String remoteUser = req.getRemoteUser();
String authentication = req.getAuthType();
String principalName = (request.getUserPrincipal() == null)
? null
: request.getUserPrincipal().getName();

out.println("<h3>User Attributes</h3>");

out.println(authentication );
out.println(principalName );


I couldn't find anything on web, Is there a way to fix this issue? Can some one help me with this ?


It is sorta covered in the JavaRanch Style Guide.
subject: WSRP between WebLogic and WebSphere, getUserPrincipal is null
Similar Threads
Silly problem: One user sees the information of another!
problem with simple JSR-168 portlet on Weblogic 10.3.5 portal server
Authentication and Authorization Problems with IIS 6 and Jrun 4
portlet jsp code puzzle
About ProcessAction