Skip to Content


After many tries to get the list of logged in users in portal, I found a simple solution. Maybe this solution is not the better but it worked fine for me.

I’m was looking for a solution like Session Management functionality of SAP NW.


I used an internal SAP API without any documentation and support. So, if SAP change the code of API, the functionality may not work properly.

Let’s go to the solution:

1 – I picked the JAR application “” in folder “/usr/sap/<SID>/J<NN>/j2ee/cluster/bin/ext/tc~jmx/lib/private/”

2 – In NWDS I created a new Portal Application and a new Portal Application Object:

    a) Portal Application:



    b) Portal Application






3 – Put the JAR into the lib folder:


4 – Adjust the Build Path:



    Another necessary JARs:



5 – Put the below code in JSP created file(LoggedInUserInformation.jsp):

                    <%@page import=””%>

<%@page import=””%>
<%@page import=””%>
<%@page import=”java.util.*”%>
<%@page import=”*”%>
<%@page import=””%>
<%@page import=”javax.naming.InitialContext”%>

<%@page import=””%>
<%@page import=””%>
<%@page import=”javax.naming.InitialContext”%>
<%@page import=”java.util.Set”%>

<%@page import=””%><br>

<table border=”1″>

SessionManagementModel model = new SessionManagementModel();
CompositeData data[] = model.getSessions();

for(int i=0;i<data.length;i++){

  if(data[i].get(“RootContextID”) != null){
  String rootContextID = data[i].get(“RootContextID”).toString();
  CompositeData details[] = model.GetSessionsForAggSession(rootContextID);
  for(int j=0;j<details.length;j++){
  <td><%=details[j].get(“IP”) %></td>
  <% }

6 – Create EAR file:





7 – Deploy EAR in Portal





8 – Test Application:

    Log in Portal > Content Administration





All information are available like in Session Management. For use then, the CompositeData parameters must be knowed. For this, is possible to use toString to show all parameters.



CompositeData data[] = model.getSessions();

for(int i=0;i<data.length;i++){ %>

     <%= data[i].toString()%><br>

<% } %>

The parameters will be displayed like this: session data,items=((itemName=ActiveRequests,,(itemName=ClusterNodeId,,(itemName=Cpu,,(itemName=IncommingTime,,(itemName=ProfileZipDataName,,(itemName=ProfileZipDataPath,,(itemName=Requests,,(itemName=ResponceTime,,(itemName=RootContextID,,(itemName=UserName,,(itemName=allocMemory,,(itemName=dbTime,,(itemName=lastAccessed,,contents={ActiveRequests=0, ClusterNodeId=null, Cpu=0, IncommingTime=0, ProfileZipDataName=null, ProfileZipDataPath=null, Requests=0, ResponceTime=0, RootContextID=null, UserName=Administrator, allocMemory=0, dbTime=0, lastAccessed=Wed Feb 12 15:37:44 BRST 2014})

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Samuli Kaski

    Although I appreciate your effort, I want to raise two concerns. You know that you are using an internal API, that is not released for customer use? The only released APIs are documented in Javadocs. Another concern I have is that the solution lists only the sessions of the AS JAVA instance on which the component runs. If there are several instances, those sessions won’t be listed.


Leave a Reply