Get an IPortalComponentRequest  in an AbstractCollectionRenderer

Hi,
We have developed a custom collection renderer based on AbstractCollectionRenderer and we need to get the request.
In EP5 we have found this solution:
PortalServletRequestWrapper stubRequest = (PortalServletRequestWrapper) this.getProxy().getDynamicPage().getPageContext().getRequest();
IPortalComponentRequest request = (IPortalComponentRequest) stubRequest.getAttribute("com.sapportals.portal.prt.component.IPortalComponentRequest");
but now, in nw04 sp14 this code doesn't work because it generate a ClassCastException.
Any ideas?
Thank you in advance.

HI Francesco,
try
IResourceContext context= list.get(0).getContext();
          Object o = context.getObjectValue("http://sapportals.com/xmlns/cm/httpservletrequest");
To get the Servlet Request. Unfortunatelly I do not know the objectValue for the portal component request.
Hope it helps anyway,
Cheers,
M.

Similar Messages

  • Portal Session gettable?

    Hi all!
    Is it possible to get the IPortalComponentRequest details in a webdynpro application. I don't want to pass data through the Application Parameters in the Portal.
    In short, Can I read directly from the Portal Session.
    Best regards,
    Andreas

    It seem that you do not add necessary libraries to your project.
    If you are creating a Development Component, add reference to DC SAP-J2EE/com.sap.security.api and select the only public part in this DC.
    If you are creating stand-alone WD project open Project Properties -> Java Build Path and add external jar:
    <path-to-nw>eclipse\plugins\com.sap.tc.ap\comp\SAP-JEE\DCs\sap.com\com.sap.security.api.sda\_comp\gen\default\public\default\lib\java\com.sap.security.api.jar
    This is a built-time support for security classes.
    For runtime, also add a reference to classes at runtime. Open Project Properties -> WebDynpro References -> Libraries and add line com.sap.security.api.sda
    Disclamer: I'm not sure regarding latest item. If it doesn't work, try to add instead Interface Reference to security_api
    Regards,
    VS

  • Store iView data for next initialisation - user dependent

    Hello All,
    i wrote a Tree-IView where the user can select a entry.
    I have 8 different pages (with content dependent of the tree selection) where this Tree-iView resides as the "Dynamic Navigation".
    The Tree-iView and the content of the pages are communicating with each other. So far so good...
    The Problem is, everytime the user changes the page he has to select the item in the tree again because with the page change the iView gets initialized again. I would like to store the user selection (there are up to 1k users in the system so the data storage needs to be session/user dependend - cross session persistence is not needed) of the Tree-IView and read it back in the wdDoInit() method of the View.
    Andbody know what whould be the proper way to do this and is there any tutorial out there?

    Hello Martin,
    thanks for answering. First your link looked easy but the first barrier was to get an IPortalComponentRequest Object from inside an java web dynpro. Then i read that its not possible to do so. After another day i found this code snip in the forum which can be put into a Views wdInit ("Test" is set in an ActionEventHandler and Readout with the next initialization of the web dynpro and put to a TextView named "TextView").
    IMaintainScope maintainer = Utils.getScopeMaintainer( WDScopeType.CLIENTSESSION_SCOPE );
    IScope scope = maintainer.getScope();
    String s = (String)scope.get("Test");
    if(s != null)
        wdContext.currentContextElement().setTextView(s);          
    It seams to work, also with multiple users, but i have to admit right now (just found it 10 min ago) i dont know why or what the code does. I'll try to find that out now.
    best regards,
    Kai

  • Need to access R3 using IConnectorServiceGateway from portal service.

    Hi everyone,
    I need to access R3 using IConnectorServiceGateway from portal service but unable to access so as I don't get the IPortalComponentRequest. Can anyone help me out on how should i do the connection ?
    Please let me know as soon as possible.
    Thanks
    Ritu

    Hello.
    I think this should work
        * Méthode renvoyant une connexion au backend SAP/R3 via un pool de
        * connexion.
        * @param userLocale  - la locale de l'utilisateur
        * @param user        - utilisateur pour lequel il faut une connection
        * @param systemAlias - système pour se connecter
        * @return une connexion au backend SAP/R3.
        * @throws ConnectionPoolException
        *             levée en cas d'erreur.
       public IConnection getConnection(
             Locale userLocale,
             IUserContext user,
             String systemAlias) throws ConnectionPoolException {
          ConnectionProperties prop = null;
          IConnection connection = null;
          IConnectorGatewayService cgService = null;
          try {
             // Connector Gateway Service.
             cgService = (IConnectorGatewayService) PortalRuntime
                   .getRuntimeResources().getService(IConnectorService.KEY);
             if (cgService == null) {
                throw new ConnectionPoolException(
                      "Error in get Connector Gateway Service...");
             IPortalComponentRequest aRequest;
             if (systemAlias == null) {
                throw new ConnectionPoolException(
                      "System alias 'systemAlias' name is null...");
             // Demande la connexion au service :
             prop = new ConnectionProperties(userLocale, user);
             connection = cgService.getConnection(systemAlias, prop);
          } catch (Exception ex) {
             throw new ConnectionPoolException(ex);
    regards
    Guillaume PATRY

  • How to get IPortalComponentRequest Object?

    Hello all,
    I need to get a handle on the IPortalComponentRequest Object for the following code. A direct cast from HttpServletRequest to PortalComponentRequest throws a classcast exception. Is there any way I can get to know the name of the WD iview and its location in the pcd?
         NavigationEventsHelperService navHelperService = (NavigationEventsHelperService) WDPortalUtils.getServiceReference(NavigationEventsHelperService.KEY);
              IPortalComponentRequest request = (IPortalComponentRequest) httpRequest;
              INavigationNode navTargetNode = navHelperService.getCurrentNavNode(request);
    Thanks for your time,
    Raj Balakrishnan

    Hi Lohi,
    I didn't found the com.sap.ep.applicationdevelopment jar.
    I add the servlet.jar, but I think U didn't understand my problem.
    I work now on Web Dynpro Project, So I don't know how to handle the request object.
    Usually when I work on  DynPage Project I handle the request object from the parent Object:<b> IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();</b>
    Thanks,
    Maya.

  • Unable to get the values from ISearchResultList

    Hi,
    I am working on KM Indexmanagemnt API for searching with TREX, to build a search similar to msn or google.
    I am following the example of Thilo Brandt, and after building the query, I am unable to retrieve the result from ISearchResultList, the results size its displaying is zero. But session.getTotalNumberResultKeys() is retrieving a value 20.
    Here is the code I am using, please tell me where I am doing wrong.
    public class SearchComponetOne extends AbstractPortalComponent {
         public void doContent(IPortalComponentRequest request,     IPortalComponentResponse response) {
      com.sap.security.api.IUser nwUser =
                   UMFactory.getAuthenticator().getLoggedInUser();
    com.sapportals.portal.security.usermanagement.IUser user = null;
    try {
          user = WPUMFactory.getUserFactory().getEP5User(nwUser);
         } catch (UserManagementException e) {
                   response.write(e.getMessage());
       response.write("<html><head><title>Search</title></head><body>");
      ResourceContext c = new ResourceContext(user);
      try {
        IIndexService indexService = (IIndexService) ResourceFactory
                             .getInstance()
                             .getServiceFactory()
                             .getService(
                             IServiceTypesConst.INDEX_SERVICE);
       SearchQueryListBuilder sqb = new SearchQueryListBuilder();
       sqb.setSearchTerm("sap");
      IQueryEntryList qel = sqb.buildSearchQueryList();
      // get an instance of federated search
    IFederatedSearch federatedSearch =
                   (IFederatedSearch) indexService.getObjectInstance(
              IWcmIndexConst.FEDERATED_SEARCH_INSTANCE);
         List indexList = new ArrayList();
         String index = null;
         if (index != null && index.length() > 0) {
              // take a specified index from index= parameter
              indexList.add(indexService.getIndex(index));
         } else {
              // take all available indexes
              indexList = indexService.getActiveIndexes();
         // it is recommended to use a search session object
         // for searching execution
         ISearchSession session = null;
         if (session == null)
         session = federatedSearch.searchWithSession(qel, indexList, c);
    response.write("Inside doContent session.getNumberResultKeys() => " + session.getNumberResultKeys()); // output as 20
         this.renderResultHeader(response, session, indexList);
         // get all results from the search session
    ISearchResultList results =     session.getSearchResults(1, session.getTotalNumberResultKeys());
    response.write(" from session => " + results.size() + " and size is : " + results.toString());  // I am getting the results.size() as zero
    Thanks

    I think the problem is UME related. I had the same problem once. Try using a system user for searching, instead of the logged on user.
    Like this:
    com.sapportals.portal.security.usermanagement.IUser user = WPUMFactory.getUserFactory().getUser("cmadmin_service");
    Please reward the points if this helps.

  • How to get the URL of an iView using AbstractPortalComponent

    Hi All,
    I need to get the URL of an iView using AbstractPortalComponent using the following code.
    But i am unable to open the URL from the Browser
    This is the following code snippet
    public class AbsClass extends AbstractPortalComponent
        public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
    IPortalComponentURI componentURI = request.createPortalComponentURI();
    componentURI.setContextName("pcd:portal_content/LOG_Viewer/LogViewer");
    String URI=componentURI.toString();
    response.write(URI);
    The output i got from the browser is:
    /irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fLOG_Viewer!2fLogViewer
    Actual Path: pcd:portal_content/LOG_Viewer/LogViewer
    Output Path: /irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fLOG_Viewer!2fLogViewer
    Why some extra numerics are embeded in the output path when compare with the Actual Path.
    Can any one send me the modified code and your suggestions, how to achieve this problem.
    Regards
    Phani

    Hi,
    Now i need to get the URL of this component.
    IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
    IPortalComponentURI componentURI = request.createPortalComponentURi();
    componentURI.setContextName("com.sap.portal.appintegrator.sap.bwc.Transaction");
    String URI=componentURI.toString();
    response.write(URI);
    I export this component into Portal and i tested with an iView based on this par file, i got the URL in the Preview.
    But when i tried to run this URL by adding the http://<IPADDRESS>:<PORTNO>+URL
    I am facing one AccessDenied Exception for this Object. ( USER/GUEST)
    Is there any security zone, or other Permissions Problem, if so can you plz guide me what are the settings i have to change inorder to resolve this exception
    Regards
    Phani

  • Problem getting jsp component from jspdynpage

    Hi,
      I am making a call in my java class in method
    doProcessBeforeOuput with the following call
    table = (TableView) this.getComponentByName("tableview_AddMaterial");
    Object[] objs = this.getComponents();
    Both return nulls for the object, how does someone access the jsp tables or text fields defined by id in htmlb in your java code I did check and all these are defined
    private IPageContext pageContext;
    private IPortalComponentRequest request;
    private IPortalComponentResponse response;
    private IPortalComponentSession session;
    private IPortalComponentContext userContext;
    private IPortalComponentProfile userProfile;
    Also here is my htmltable in the jsp
    <hbj:tableView
    id="tableview_AddMaterial"
    model="DHB.queryResultsModel"
    design="TRANSPARENT"
    headerVisible="false"
    footerVisible="true"
    visibleRowCount="50"
    visibleFirstRow="1"
    selectionMode="MULTISELECT">
    </hbj:tableView>
    Any help would be greatly appreciated and I do reward points for helpful answers
    Cheers,
    Devlin

    Hi Devlin
    You can access the fields in jsp as follows.For example, consider tableview with id "myTableView".
    <b>TableView table = (TableView) this.getComponentByName("myTableView");</b>
    If you add this line, you can get all the values related to tableview.For example, to get the first visible row of the tableview, the code goes as follows.
    <b>int firstVisibleRow = table.getVisibleFirstRow();</b>
    Jsp for the same:
    ==================
    <hbj:tableView
                        id="myTableView"
                        model="tablebean.model"
                        design="ALTERNATING"
                        headerVisible="true"
                        footerVisible="true"
                        selectionMode="MULTISELECT"
                        headerText="Office locations"
                        visibleFirstRow="1"
                        visibleRowCount="5"
                        rowCount="16"
                        width="500px">
                   </hbj:tableView>
    Try and let me know the results.
    Hope this helps.
    Regards
    Yoga

  • Get current user in portal service context

    hi guys,
    We want to implement a portal service which will check user's role from LDAP, and we need to get the current user id.
    We know for class IPortalComponentRequest, there is method getUser().getUserId(), is there any similar method for IServiceContext? or any way for us to get user id in portal service?
    regards,
    Guo Feng

    Hi Feng,
    Implement
    public String getParameter(IPortalComponentRequest arg0, String arg1)
    eg in your implementation class and add the following code.
    IUserContext userContext = arg0.getUser();
    String username = userContext.getLogonUid();
    String full_name = userContext.getDisplayName();
    HTH

  • Portal Component receives GET from other app out of the Enterprise Portal?

    Hello.
    I want to design a portal component, to which i can send GET-Parameters via URL.
    The sending application runs out of the enterprise Portal and has a simple HTML-form (The portal component generates HTML and JAVA-Script for a Flex Application in the Enterprise Portal which should point to a specific document named in the params. The params will be written into the generated HTML document after calling).
    Is this possible without authetification and how would the URL looks like, which is used to call the enterprise portal?
    Pls help me.
    With best regards
    Edited by: Björn Karpenstein on Aug 15, 2008 11:02 AM
    Edited by: Björn Karpenstein on Aug 15, 2008 11:03 AM
    Edited by: Björn Karpenstein on Aug 15, 2008 11:05 AM

    Hi Björn,
    you can access request parameters with the following code in the standard methods of your Portal Component:
              // IPortalComponentRequest request;
              request.getServletRequest().getParameter("ParamName");
    The direct URL of your Portal Component without a specific iView is:
    http://
    If your component should be directly accessable without authentication you must add the following property in your portalapp.xml in the the component-profile section:
          <component-profile>
            <property name="AuthScheme" value="anonymous"></property>
          </component-profile>
    Best regards,
    Stefan Brauneis

  • Can't get content from PCD

    Hi,
    I've developed a small project to read content from pcd, in this case, to get roles attributes. I've followed this tutorial http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6112ecb7-0a01-0010-ef90-941c70c9e401?QuickLink=index&overridelayout=true, but I keep getting a NoClassDefFound for IPCDContext and PCDSearchConrols(if i choose to use this objet instead). I've added a DC of the External Library type to my project wich contained all the jars needed. Here's the code for my project:
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingEnumeration;
    import javax.naming.NamingException;
    import javax.naming.directory.DirContext;
    import java.lang.Object;
    import com.sap.portal.directory.Constants;
    import com.sap.portal.pcm.admin.PcmConstants;
    import com.sap.security.api.IRole;
    import com.sap.security.api.IUser;
    import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;
    import com.sap.tc.webdynpro.services.sal.um.api.WDUMException;
    import com.sap.teste.wdp.IPrivateShowRoleView;
    import com.sapportals.portal.pcd.gl.IPcdContext;
    import com.sapportals.portal.pcd.pcm.roles.IPortalRole;
    import com.sapportals.portal.pcd.gl.IPcdAttribute;
    import com.sapportals.portal.pcd.gl.IPcdContext;
    import com.sapportals.portal.pcd.gl.IPcdSearchResult;
    import com.sapportals.portal.pcd.gl.PcdSearchControls;
    import com.sap.portal.pcm.admin.IAdminBase;
    import com.sap.portal.pcm.admin.IAttributeSet;
    import com.sap.portal.pcm.admin.ValidationException;
    import com.sap.tc.webdynpro.progmodel.api.WDValueServices;
    import com.sap.tc.webdynpro.progmodel.api.WDVisibility;
    import com.sap.tc.webdynpro.services.sal.datatransport.api.IWDResource;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.pcd.gl.IPcdSearchResult;
      public void wdDoInit()
       IUser user = null;
        try{
             user = WDClientUser.getCurrentUser().getSAPUser();
        catch(WDUMException e){
             wdContext.currentContextElement().setResult(e.getMessage());
             Hashtable env = new Hashtable();     
         env.put(IPcdContext.SECURITY_PRINCIPAL, user);
         env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
         env.put(Constants.REQUESTED_ASPECT,   IPcdAttribute.PERSISTENCY_ASPECT);     
         InitialContext iCtx = null;
         try
              String iRoleDir = "pcd:portal_content/mmmarques/role_teste3";
              iCtx = new InitialContext(env);
              IPcdContext attrSet = (IPcdContext) iCtx.lookup(iRoleDir);
              attrSet.getAttributes("").get("com.sap.portal.pcd.gl.CreatedAt").get().toString();
              attrSet.getAttributes("").get("com.sap.portal.pcd.gl.LastChangedBy").get().toString();
              attrSet.getAttributes("").get("com.sap.portal.pcd.gl.LastChangedAt").get().toString();
              attrSet.getAttributes("").get("com.sap.portal.pcm.Title").get().toString();
         catch (Exception e) {
              wdContext.currentContextElement().setResult("failed");
    If anybody could help, I would be very grateful. Thanks in advance

    Also, when I try to build my external library DC I get the following warnings:
    createPublicParts:
      [pppacker] Packing public part 'ExternalLibs'
      [pppacker] Packed   1 file  for entity activation.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity bc.rf.framework_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity bc.rf.global.service.mime_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity bc.rf.global.service.pipeline_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity bc.rf.global.service.urlgenerator_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity bc.sf.framework_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity bc.util.public_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity com.sap.portal.navigation.api_service_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity com.sap.portal.navigation.helperservice_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity com.sap.portal.navigation.service_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity com.sap.portal.pcd.roleservice_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity com.sap.portal.themes.lafservice_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity com.sap.portal.usermanagementapi.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity com.sap.security.api.ep5.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity com.sap.security.api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity gl_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity km.shared.command_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity km.shared.repository.service.accessstatistic_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity km.shared.repository.service.app.subscription_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity km.shared.repository.service.timebasedpublish_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity km.shared.service.actioninbox_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity km.shared.ui.util_api.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity mail.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity ojdbc14.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity poi-3.0-rc4-20070503.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity poi-contrib-3.0-rc4-20070503.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity poi-scratchpad-3.0-rc4-20070503.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity prtapi.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity prtconnection.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity prtjndisupport.jar (Archive/Java Library)
      [pppacker] Packed   1 file  for entity tcepbcpcmadminapijava.jar (Archive/Java Library)
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\com.sap.portal.usermanagementapi.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\km.shared.repository.service.timebasedpublish_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\bc.rf.global.service.mime_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\prtconnection.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\bc.rf.framework_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\gl_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\poi-3.0-rc4-20070503.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\prtapi.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\bc.util.public_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\com.sap.portal.navigation.service_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\com.sap.portal.navigation.helperservice_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\activation.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\bc.sf.framework_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\com.sap.portal.themes.lafservice_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\com.sap.portal.pcd.roleservice_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\com.sap.security.api.ep5.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\com.sap.security.api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\tcepbcpcmadminapijava.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\prtjndisupport.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\km.shared.command_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\km.shared.ui.util_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\poi-contrib-3.0-rc4-20070503.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\bc.rf.global.service.pipeline_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\km.shared.service.actioninbox_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\km.shared.repository.service.app.subscription_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\bc.rf.global.service.urlgenerator_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\com.sap.portal.navigation.api_service_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\km.shared.repository.service.accessstatistic_api.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\ojdbc14.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\mail.jar
      [pppacker] WARNING: Can not overwrite file C:\Users\mmmarques\.dtc\1\DCs\sonae.com\ag360\jars_dc2\_comp\gen\default\public\ExternalLibs\lib\java\poi-scratchpad-3.0-rc4-20070503.jar
      [pppacker] Packed 31 entities for public part 'ExternalLibs'
         [timer] Packing of public part 'ExternalLibs' finished in 0.047 seconds
    Edited by: babonhas8 on Jul 22, 2011 11:16 AM

  • How to get the Clinet IP address in PAR files

    Hi Frndzz...
    My requirement is  to get the log on details of portal users, here i need the User ID n client IP address .
    Am trying to  get these details from masthead iview PAR file, and this details am passing to a java(custom) class which can create a log_Test.txt file with these details.
    User ID am gettiing using UME API like this in masthead PAR file
    public void GetWelcomeID(IPortalComponentRequest request, String welcomeClause)
    IUserContext userContext = request.getUser();
    String usr =userContext.getLogonUid();
    But am unable to get the Client IP
    In normal JSP will get the client IP like this   request.getRemoteAddress()
    So in par file i used the IPORTALCOMPONET request to get the client IP,  i thought IPORTALCOMPONET request  is equalent to HTTPSERVLETRequest request interface.
    Any one suggest me that how we can get the Client IP in PAR files .
    Thanks in Advance
    Regards
    Rajesh

    Hi,
    This is a very interesting question, i searched many time before to get an answer for this on sdn. I havn't found solution. As i know, It is very diffcult to find the ip address from request object.
    The main reason is, before reaching the servlet class the request is by pass through other node like dispatcher/central node. If you try to fetch request objects ip from server class i think it will only return you the dispatcher server ip only.
    There is a solution for this problem.. if you are able to fetch the ip using some client side scripting and pass it to the servelet as parameter, i hopes you can acheive this.
    I will try this and let u know the result.
    Others please share your thoughts on this topic.
    Regards
    Baby

  • How to get the room id & user id in our component

    Hi Experts,
    Collaboration -> Rooms -> Room Directory
    It will show the available rooms
    Select restricted room tab in that.
    That will show the restricted room list, if you are not a member of the room you can request the room by clicking context menu of the room and select the “Request Membership” option. Then it will send the mail to the owner of the room.
    In that UI commend they mapped with the roomid and userid.
    I need to know how to get the room id & user id in our component.
    How to get the Room Id dynamically?
    Can anybody help me for this?
    Helpful answers will appreciate.
    Thanks and Regards,
    Kathiresan R

    Hi Kathiresan,
    you can get the Room ID and the User ID over the API.
    Getting User ID within WebDynpro application:
    IUser user = WDClientUser.getCurrentUser().getSAPUser();
    String logonId = user.getUniqueId();
    Getting User ID within custom Portal Component:
    IPortalComponentRequest request = (IPortalComponentRequest) httpRequest;
    IUser user = request.getUser();
    String logonId = user.getUniqueId();
    Getting Room Id of a user who belongs to this room:
    IUser user = request.getUser();
    IRooms roomsAPI = (IRooms) PortalRuntime.getRuntimeResources().getService(IRooms.PORTAL_SERVICE_ID);
    IRoom[] myRooms = roomsAPI.getAllRoomsForUser(user);
    String roomId = "";
    for (int i=0; i<myRooms.length; i++) {
      IRoom room = myRooms<i>;
      if (room.getName.equals('nameOfRoomToFind')) {
        roomId = room.getId();
    Greets
    Denis

  • How to get the "where used" of a portal object.

    Hi folks!
    I'm coding a program to get the list of the portal objects where a specific portal object (an iView  for example) is used. I found the method getWhereUsedList from IPcdContext but I'm getting some errors.
    Is this the best/correct way to get a "where used list"?
    Does anyone have an example of how to use this method correctly?
    Thanks in advance.
    Geraldo.

    Hi Tanja, thank you very much for your attention.
    Following your tips I figured out that the error was occurring during the casting and not during the getWhereUsedList method call. Now, I'm casting to Object. I'd like to cast to a more proper class. During my tests I got an error that showed me that the cast should be to a PcdGlSearchResult class. I couldn't find any javadoc for this class and when I changed the cast to this class I started to get a execution class load  error. Please let me know if you have any advice regarding the casting.
    private void getWhereUsed1(IPortalComponentRequest request, String id, StringBuffer sb) {
    InitialContext iCtx = null;
    Object objectId = null;
    String tString = null;
    Hashtable env = null;
    IPcdContext result = null;
                         env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
    env.put(Context.SECURITY_PRINCIPAL, request.getUser());
    env.put(Constants.REQUESTED_ASPECT, IPcdAttribute.PERSISTENCY_ASPECT);
    try {
    iCtx = new InitialContext(env);
    result = (IPcdContext) iCtx.lookup(id);
    for (NamingEnumeration ne = result.getWhereUsedList(""); ne.hasMoreElements();) {
    objectId = (Object) ne.nextElement();
    tString = objectId.toString();
    sb.append(tString + CR);
    } catch (Exception e) {
    StackTraceElement[] elements = e.getStackTrace();
    for (int i = 0; i < elements.length; i++)
    sb.append(elements<i> + CR);

  • Access to IPortalComponentRequest in custom security manager

    Hi All,
    I am implementing a custom security manager. For my requirements, I need IPortalComponentRequest object in the security manager class. Can anyone give me a clue to get the request object in security manager implementation.
    Regards,
    Yoga

    Hi Romano,
    I tried this. Its returning mysapsso2 cookie and authentication_schema cookie. But not retuning any custom cookies added to the response from any other application.
    What I have tried to achieve is:
    1. When a user login and authentication suceeds, I will add a custom cookie to the response.
    2. Get the custom cookie added in the security manager class and do manipulations to check whether the user is authenticated.
    Using the method you have suggested, I was not able to get any custom cookies added in other applications.
    I tried the code using resource context(resource context obtained form IUser) as suggested in other threads,
    HttpServletRequest request = (HttpServletRequest) resourceContext.getObjectValue("http://sapportals.com/xmlns/cm/httpservletrequest");
    But this API returns null.
    Any way to achieve?
    Regards
    Yoga

Maybe you are looking for