• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to pass the logged user ID into SDO to filter results

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using RAD 7 and WSP 6 for portlet development.
Portal is LDAP enabled.
I pull user's ID into faces jsp in a portlet.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Here is the code:
<%
javax.naming.Context ctx = new javax.naming.InitialContext();
com.ibm.portal.um.PumaHome home = (com.ibm.portal.um.PumaHome)
ctx.lookup("portal:service/usermanagement/Puma");
PumaProfile profile = home.getProfile( request );
Map userMap = profile.getAttributes(profile.getCurrentUser(),Arrays.asList (new String[]{"uid"}));
Object attrObj = userMap.get("uid");
%>
<form><input type="test" name="test2" value="<%=attrObj%>"></form>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
It works.

I need to pull data only for one (logged in) user from Oracle 10g db.
I have created SDO, and now I need to pass this user's uid to filter results.
No matter what I tried it did not work.

Can anyone give me an idea how to do it?
 
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic