Retrive portal user logged from HttpServlet
Hi all,
i've implemented an URL iview containing a Java application. I've to retrive the user logged on portal from the application's servlet contained into url iview.
Please, any idea!?!?!
help me!!!
Andrea
Hi,
Since the servlet is running in a different container I'm not sure there's a clean way.
What about passing in the user id on the url string? http://<myurliview>?myuserid=<user> ?
Your servlet would then have access to this via request.getParameter("myuserid").toString();
The application integrator can take care of parametizing this for you. See here http://help.sap.com/saphelp_nw04/helpdata/en/70/5a3842134bad04e10000000a1550b0/frameset.htm
Hope this helps,
Marty
Similar Messages
-
How to access a Portal User Info from a J2EE application?
Hi,
I have deployed a j2ee application in portal and its running fine.
from that application i need to assign some roles to some users.i have the user id.
so my doubt is can i access the portal user info from this j2ee application?i have some servlets in the j2ee application....can i get the portal user info from this servlet?
plz help me
regards,
VisweswarHi,
Please check out this to get the portal user information from Java -
WdClientUser class/Interface to aciehve this.
Please check out these links on the same -
WDClientUser.getClientUser IUser
help needed
Regards
Lekha -
How to get the user log from the entried planning data ???
Dear All,
Could you help me to give the suggestion regarding that please .. ?? :).
I have requirement to get the last user who in charge in modifying the planning data.
Or in the other words, i'm gonna get the log from the entried planning data.
e.g.
1. Phase 1 - My Friend:
Create the planning data :
Country Sales
INA $1000
2. Phase 2 - I update it and create new record.
Country Sales
INA $1500 < modified >
USA $400 < new >
Could i get the log from those records ??
The log can be contain:
the created user & modified user ??
I just read the article regarding status and tracking system in BPS, but could i cover that requirement ??
(Because i got that the status and tracking system for creating a workflow for planning).
Or ..
Is there other way that can fulfill this requirement ???
Really need your guidance all.
Regards,
Niel.Dear Mayank,
Tks a lot for your responses.
I've tried it but in BPS version..
I saw in the document there is GUID (unique ID), could you explain me what the objective is ???
I work out to plan to store the user created, date created, and planning level information in the log data.
What do you think ..
Is it better to display them in the BEx Report / another manual planning layout ???
What did you display the log data in your case ??
Still need your guidance ..
Really - really thanks.
Niel. -
Extract Portal User Name From HTTP POST Request (WSRP SOAP)
How can we extract the user name from the HTTP POST Request (*WSRP SOAP*) from the Portal to the Portlet Provider (Producer)?
We are load balancing between the Portal (10.1.14.2) and the providers (OC4J 10.1.3.3) and would like to extract the user name within the load balancer so we can create session affinity based on it.
BTW, we already tried using TCP Flow but were unable to see the user name.From the documentation, it seems that you need to use
HttpURLConnection.setRequestMethod("POST"); // "GET" is the defaultalthough I have seen examples on the web without it.
Try!
Edit: Also the single quotes around userid and password may be a problem.
Use the previous poster suggestion, but do not include the single quotes.
Edited by: baftos on Aug 6, 2008 4:27 PM -
Portal users monitoring from EP5
Hi,
I am using EP5sp6.Is there any way to get information from portal monitoring that how many users have logged on Portal(EP5) in the last 6 months (by week)?" .
is there any log file to monitor the portal .please provide me the pathYou could probably setup http loggin on the http service of the SAP J2EE engine.
-Login to the administration console
-find the http service for an application node and enter it
-In the general tab check enable login and set the path to log
Then you could probably use a tool like http://awstats.sourceforge.net/ to analyse the logs. -
How to find out portal user from sso cookie ?
Hi,
I want to find out the portal user id from Portal30_sso cookie. It is required for security in my java servlet.
Thanks
VikasFirst of all, you can't get anything from the portal30_sso cookie or the portal30 cookie or the SSO_ID cookie. These are cookies established for (1) The login server session; (2) The Portal session; (3) The login server single sign-on cookie - visible only to the login server.
When you want to know who the current user is, you need to establish the context. If your servlet is standalone and not a partner application to the login server and it's not a portlet, etc., then what context does it have? What concept of users does it have? If you are really asking what Portal is currently logged on, that is still a loaded question. The user's browser could be accessing several portal's at the same time, each with a different identity. What I am getting at is that your servlet needs to somehow be associated with a particular portal before it can even think of asking this question.
The ways to associate your servlet with a portal would be
[list=1]
[*]Make it a partner application
[*]Make it a portlet
[*]Make it an external application
[list]
Hope that helps. -
Create portal user using web dynpro abap application
Dear All,
I would like to know is it possible to create portal user-id through web dynpro abap application.
My requirement is
> I have to create a web dynpro abap application. In the web dynpro abap application I have name email-id and phone number as entry fields.
> I will click on submit, one unique id will get created. This unique id will be the login id for portal.
I found how to create portal user using web dynpro java, but i could not find regarding web dynpro abap.
If it is possible to create the portal users using web dynpro abap pls share the code as well.
Regards,
Swapnil IndulkarHi swapnil,
I think by using BAPi.. BAPI_USER_CREATE1 you can create.
Please check this...
Create portal user from webdynpro abap
Creating user and assigning a group through code
user administration su01
How can i get the portal user id from logon ticket in the webdyn 4 ABAP
Cheers,
Kris.
Edited by: kissnas on May 21, 2011 8:47 AM -
I am looking for a way to create a procedure or use an api in order to return the last time a portal user logged in to their account. Any suggestions?
nullI cannot think of any APIs in the PDK that will do this, but it is very simple to do via custom coding etc.
Create a table with a minimum of these base columns:
PORTAL_USERNAME
LAST_LOGIN_DATE
etc.
You could create a custom login or logout portlet which uses the WWSEC APIs and also reference a function that adds or updates a row in the above sample table. That way you can keep track of this information. If you use a custom portlet, remember to turn off your page links as appropriate so that there are no ways to escape using the custom portlet!
It is probably best to do it on the login process and people may not log out properly, i.e., close the browser which means you do not get an accurate picture of log in times.
You then can in your custom portlets/apps etc. do a check against this table to do simple things like 'Welcome back John' etc. etc. -
Hi,
How to find the number of portal users logged in?
Thanks,
G. Sathya PriyaHey
You can browse through this hope it will help you
Re: Portal on-line users counter
Also there are user activity tables under portal schema, u can also use those tables for such reports
Regards -
Retriving user details from user rofile in portal database
HI all,
any one knows how to retrive user details from user rpofile in portal database. I am using webdynpro appliction.Please reply.
Thank you
MaruthiHi maruti Rao ,
All Gives U gud Idea..here i give u some brief procedure.First of all u need to add 2 jar file in ur project structure for proper working of "com.sap.security.api.IUser" Interface. After that for retriving Users data Stored on LDAP Server.
If you are using an LDAP directory as a data source for your user-related data, the logical attribute names used by the Java application programming interface (API) of SAP User Management Engine (UME) must be mapped to the physical attribute names used in the schema of your corporate LDAP directory.
Example Data-Source File is as Below From Where U can Get All The Information of Logged user...
<dataSources>
<dataSource id="CORP_LDAP"
className="com.sap.security.core.persistence.datasource.imp.LDAPPersistence"
isReadonly="false"
isPrimary="true">
<responsibleFor>
<principal type="account">
</principal>
<principal type="user">
<nameSpaces>
<nameSpace name="com.sap.security.core.usermanagement">
<attributes>
<attribute name="firstname" populateInitially="true"/>
<attribute name="displayname" populateInitially="true"/>
<attribute name="lastname" populateInitially="true"/>
<attribute name="fax"/>
<attribute name="email"/>
<attribute name="title"/>
<attribute name="department"/>
<attribute name="description"/>
<attribute name="mobile"/>
<attribute name="telephone"/>
<attribute name="streetaddress"/>
<attribute name="uniquename" populateInitially="true"/>
</attributes>
</nameSpace>
</nameSpaces>
</principal>
<principal type="group">
</principal>
</responsibleFor>
<attributeMapping>
<principals>
<principal type="account">
</principal>
<principal type="user">
<nameSpaces>
<nameSpace name="com.sap.security.core.usermanagement">
<attributes>
<attribute name="firstname">
<physicalAttribute name="givenname"/>
</attribute>
<attribute name="displayname">
<physicalAttribute name="displayname"/>
</attribute>
<attribute name="lastname">
<physicalAttribute name="sn"/>
</attribute>
<attribute name="fax">
<physicalAttribute name="facsimiletelephonenumber"/>
</attribute>
<attribute name="uniquename">
<physicalAttribute name="uid"/>
</attribute>
<attribute name="loginid">
<physicalAttribute name="null"/>
</attribute>
<attribute name="email">
<physicalAttribute name="mail"/>
</attribute>
<attribute name="mobile">
<physicalAttribute name="mobile"/>
</attribute>
<attribute name="telephone">
<physicalAttribute name="telephonenumber"/>
</attribute>
<attribute name="department">
<physicalAttribute name="ou"/>
</attribute>
<attribute name="description">
<physicalAttribute name="description"/>
</attribute>
<attribute name="streetadress">
<physicalAttribute name="postaladdress"/>
</attribute>
<attribute name="pobox">
<physicalAttribute name="postofficebox"/>
</attribute>
<attribute name="preferredlanguage">
<physicalAttribute name="preferredlanguage"/>
</attribute>
</attributes>
</nameSpace>
</nameSpaces>
</principal>
<principal type="group">
</principal>
</principals>
</attributeMapping>
</dataSources>
regard's
Dheerendra Shukla -
Retrieving User Details from OID: Portal 10.1.2
I am trying to retrieve the user object from the OID when the person logs in to the portal. I would need to retrive the group name and some attributes from the OID for the person logged in.
Any ideas where I can get a snippet of code which does this? I am using Portal Version 10.1.2.Hi Soumak
Use
s_email wwsec_oid.VC_ARR := wwsec_oid.get_user_attr_vals(p_username => p_user,p_attr =>'mail' ,p_base =>'cn=users,dc=my_company,dc=com');
s_nom wwsec_oid.VC_ARR := wwsec_oid.get_user_attr_vals(p_username => p_user,p_attr =>'sn' ,p_base =>'cn=users,dc=my_company,dc=com');
s_prenom wwsec_oid.VC_ARR := wwsec_oid.get_user_attr_vals(p_username => p_user,p_attr =>'givenname',p_base =>'cn=users,dc=my_company,dc=com');
or the dbms_ldap package :
ldap_host := 'your_host';
ldap_port := '4032';
ldap_user := 'cn=orcladmin';
ldap_passwd := 'orcladmin_pwd';
ldap_base := 'cn=users, dc=your_company,dc=com';
-- Choosing exceptions to be raised by DBMS_LDAP library.
DBMS_LDAP.use_exception := TRUE;
my_session := DBMS_LDAP.init (ldap_host, ldap_port);
-- bind to the directory
retval := DBMS_LDAP.simple_bind_s (my_session, ldap_user, ldap_passwd);
-- issue the search
my_attrs (1) := '*'; -- retrieve all attributes
my_selection := 'cn=' || p_cn;
retval :=
DBMS_LDAP.search_s (my_session,
ldap_base,
DBMS_LDAP.scope_subtree,
--'objectclass=*',
my_selection,
my_attrs,
0,
my_message
-- get the entry
my_entry := DBMS_LDAP.first_entry (my_session, my_message);
entry_index := 1;
p_mail := '';
p_tel := '';
p_sn := '';
p_givenname := '';
my_dn := DBMS_LDAP.get_dn (my_session, my_entry);
my_attr_name :=
DBMS_LDAP.first_attribute (my_session, my_entry, my_ber_elmt);
attr_index := 1;
WHILE my_attr_name IS NOT NULL
LOOP
my_vals := DBMS_LDAP.get_values (my_session, my_entry, my_attr_name);
IF my_vals.COUNT > 0
THEN
FOR i IN my_vals.FIRST .. my_vals.LAST
LOOP
IF my_attr_name = 'mail'
THEN
p_mail := SUBSTR (my_vals (i), 1, 200);
END IF;
IF my_attr_name = 'telephonenumber'
THEN
p_tel := SUBSTR (my_vals (i), 1, 200);
END IF;
IF my_attr_name = 'sn'
THEN
p_sn := SUBSTR (my_vals (i), 1, 200);
END IF;
IF my_attr_name = 'givenname'
THEN
p_givenname := SUBSTR (my_vals (i), 1, 200);
END IF;
END LOOP;
END IF;
my_attr_name :=
DBMS_LDAP.next_attribute (my_session, my_entry, my_ber_elmt);
END LOOP;
-- Free ber_element
DBMS_LDAP.ber_free (my_ber_elmt, 0);
-- free LDAP Message
retval := DBMS_LDAP.msgfree (my_message);
-- unbind from the directory
retval := DBMS_LDAP.unbind_s (my_session); -
How to get Portal user from a standalone Java application
Hi,
I have a standalone Java application from where I need to fetch the Portal User Information like userid and email id.
I am using the below line of code
iUser = UMFactory.getUserFactory().getUserByLogonID("e017939");
I have included the jar file com.sap.security.api , But it was giving me the below exception
java.lang.NoClassDefFoundError: com/sap/tc/logging/Location
at com.sap.security.api.UMFactory.<clinit>(UMFactory.java:55)
at com.am.wcas.java.mailscheduler.kmaccess.FetchDataFromKM.getiUser(FetchDataFromKM.java:29)
at com.am.ScheduleEmails.main(ScheduleEmails.java:89)
and I am getting a pop Up message from the Java Virtual Machine Launcher, saying a Fatal Exception has occured and the Program will exit.
Then I went throught he SDN threads and they asked me to include the
logging.jar and com.sap.security.perm.api .
I Included them, then also, it is giving me Exception
java.lang.NoClassDefFoundError: com/sap/engine/lib/logging/LoggingHelper
at com.sap.security.api.UMFactory.<clinit>(UMFactory.java:56)
at com.am.FetchKMData.main(FetchKMData.java:30)
Exception in thread "main"
and I am getting a pop Up message from the Java Virtual Machine Launcher, saying a Fatal Exception has occured and the Program will exit.
Kindly let me know if it is possible to access the User info using UMFactory in a standalone Java application. If yes kindly let me know where i am going wrong.
Regards,
Shilpa B.VHi Shilpa,
1. Check that you have added com.sap.security.api within the Your Project>Libraries folder (under navigation tab) and also added jars in the build path of the Your Project under project>properties>Build Path.
2. In case you have a DC instead of Web Dynpro Project then you have to add the com.sap.security.api under Your DC>Used DCs and have compile time and runtime dependency added.
Here java.lang.NoClassDefFoundError is caused basically due to only build time dependency added and reference to the jar missing at runtime. Rest the code to retrieve the current user id using UME API and getUserByLogOnID("....") method with/without portal environment would not be an issue at all.
Regards,
Tushar SInha -
How to Restrict same portal user from other node
Hi
In my application, we charge customers for each portal user logins. But, i found that, they can share same user logins amongs number of people.
I don't want to allow the same portal user login into the application if that user is already logged in and it's session is still active.
Here is the Scenario :
User A is logged in to the portal from terminal AA. Now, User A agin tries to logg in to the portal from terminal BB. I don't wnat to allow user A to log in from terminal BB bcuz user A has active session from terminal AA.
Can anyone know how to implement this??
thanks in advance.
SriniHi Srini!
We have solved this problem with our own login portlet. Before the final login we've got to check (from the certain table) how many logins there are currently with that username.
But there is a problem. If the user closes the browser without logoff, the session remains active. There is a cleanup job, which removes those session in some hours. Still it is not very elegant.
Regards,
Jari -
How we can see logged in portal user
hello SAP EP gurus,
How i can know how man users are logged on my EP Portal and which user is using which report.Is there any way to find out this thing.?
Also how we can see the performance of our portal?
Waiting for earliest reply.
regards
Neeraj PandeyHi,
You can use " portal Activity Report" for this purpose.
alternatively, if you have access to server you can check this through visual admin
simply open visual admin,open on your servernode --services,click on Performance Tracing,click on JARM and choose what you want to see.
its easy to use standard portal Activity Report.
else you can use third party reports loke "google analytics" which will give the number of users logged in, what the navigation of each user, from which geographical area the user has logged in and all about the user logged into the portal and portal performance.
you need to login with your gmail id and password and download the code and use it in you portal application... its very easy to use.
https://www.google.com/analytics/home/
PradeeP -
Fetching Currently Logged in Portal User & Fetch Users logged on whole day
Hi All,
I want to fetch the Currently online Portal Users and their name.
Also we want to fetch all users from different servers as we have load balancing.
Also i want to fetch which users have logged on a particular day, so that i can come to know that at end of day which users have logged on.
Thanks & Regards,
Dhruv ShahHi,
you can connect to the above mentioned tables by creating a alias or else using the default alias
for this you have to login into the visual admin
server ---> services -
> jdbc connector
there you can find the table with the alias.
The default aliases what i know are SAP/BC_JMS,SAP/BC_UME,SAP/BC_WDRR.
I think this will be usefull
or else craete a new alias using Add alias button.
The code for getting connection is
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("jdbc/SAP/BC_JMS");
Connection con = ds.getConnection();
//you can write ur select statement and continue
But i have a doubt can you tell me what information does these tables contain.
Thanks & Regards,
Lokesh
Edited by: lokesh kamana on Aug 26, 2008 8:57 AM
Maybe you are looking for
-
SCPI Instrument driver for LabWindows​/CVI ?
Is there somthing like a plain SCPI instrument driver for LabWindows/CVI that works with all SCPI-DMMs ? Thanks, Manfred
-
How to get aggregation at Year-Month level??
Hi experts, I've Date and Qty column in rpd. I've created the aggregated column in rpd with Sum aggregation (Sum Qty) My report is coming in this format.. Date...........Sum(qty) 1/1/2009..........5 1/2/2009..........4 1/6/2009..........10 2/3/2009..
-
How do I find origional files?
I rearranged my music folders on my computer and now when I attempt to play a song in my iTunes it gives me this error message: The song could not be used because the original file cannot be found. Would you like to locate it. I am able to locate the
-
SPNego, Reverse Proxy?
We all know that we should be switching to SPNego and I am trying to set up a new portal with it now. My question is, if we are to use SPNego now, how does that act as a reverse proxy? This is supposed to be replacing IISProxy, right?
-
Experts? Colors completely off when printing images edited in LR-Help, Please!
I have one week left to get ready for a show that I have already dumped 3,000 worth of supplies into, but now that I'm ready to print, and I've imported and edited everything in my new trial of Light Room, my prints are completely off from my images.