Portal API question

Can someone pleasehelp me understand how the following code works?
<%@ page import = "com.sapportals.portal.prt.resource.IResource" %>
aResponse.addResource(componentRequest.getResource(IResource.CSS, "css/main2.css"));
or
String webpath = componentRequest.getWebResourcePath()+"/"; // where is this declared? how can they use it with no declaration? What do I need to import in order to use getwebresourcepath?
What class/interface/api does this belong to? When I lookup the IResource Interface in the Javadocs it makes no mention of getResource(); and I cannot find any reference to getWebResourcePath Furthermore, I can never find where componentRequest is being declared.
I am having trouble looking at the code especially in a .jsp and figuring out where the methods and classes are coming from or what I would need to do to use the code for myself.  Any help?
Thanks
Paul

Hi,
Check this:
http://help.sap.com/saphelp_nw70/helpdata/EN/02/4eae42cb9f0f31e10000000a1550b0/frameset.htm
So these are the JSP objects which are accessible from within a JSP page automatically.
componentRequest is an object of type IPortalComponentRequest and it has helper methods like getWebResourcePath and getResource. You need not import any thing to use these JSP objects.
getResource method is not part of IResource class but part of IPortalComponentRequest  class.
If still unclear, let me know.
Regards,
Praveen Gudapati

Similar Messages

  • Portal Secret Question API

    Hi,
    I need to develop a report using PDK / Web Dynpro to generate Report of users who have not set the Secret Question in Portal. . Could someone share sample code for getting Portal Secret Question  through UME API? . We are having NW 7.0 SP17 landscape.
    Thanks
    Vasu

    Hi Vasu,
    Try printing all namespace and attibutes using following code. You might find the required namespace-attribute mapping.
    IWDClientUser wdClientUser1 = WDClientUser.getCurrentUser();
    IUser user = wdClientUser1.getSAPUser();
    try
         String[] namespaces = user.getAttributeNamespaces();
         for(int i=0; i<namespaces.length; i++)
              response.write("<br>Processing namespace "+namespaces<i>);
              response.write("<br>==================================");
              String[] attributes = user.getAttributeNames(namespaces<i>);
              for(int j=0; j<attributes.length; j++)
                   response.write("<BR>ATTRIBUTE NAME="+attributes[j]);               
    catch(Exception e)
         response.write(e.getMessage());
    Also, check out UME API : http://help.sap.com/javadocs/NW04S/current/se/overview-summary.html
    Hope this helps.
    Regards,
    Vaibhav

  • Calling Portal APIs from Apex

    I have posted this on the application express forum as well, not sure who will come up with the answer, so here is my question anyway.
    I am trying to call the portal.wwsec_api from within an apex application. The application is parsed using the portal schema so has all the correct grants by default.
    The code I am using is:
    declare
    l_person_rec wwsec_person%rowtype;
    begin
    l_person_rec := wwsec_api.person_info
    p_user_name => 'PORTAL'
    :P3_USER_INFO:=l_person_rec.user_name || l_person_rec.first_name;
    exception
    when others then
    :p3_user_info:=sqlerrm;
    end;
    This code (minus the item references) runs fine in sqlplus, but errors when I run it in apex. I have narrowed it down to the api that is erroring as I can access the table direct.
    Can anyone help with this?
    Thanks

    I have now solved this problem. If you want to access portal apis from apex you need to set a portal context like this:
    portal.wwctx_api_private.set_context( p_user_name => 'portal'
    , p_password => 'portal');
    This shouldn't impact security as the value of p_password does not have to be your schema password it can be set to anything.

  • Portal Secret Question

    Hi,
    I need to develop a report using PDK / Web Dynpro to generate Report of users who have not set the Secret Question in Portal. . Could someone share sample code for getting Portal Secret Question through UME API? . We are having NW 7.0 SP17 landscape. The purpose of the report is to send mail to users asking them to set the secret question who have not maintained the secret questions . When they forget the password , request is created for auth team to reset the user's password.
    In general , Is there any way to enforce the user to set the portal secret question during initial logon or at least whether report can be developed using UME API.
    Thanks
    Vasu

    Hi Vasu,
    Try printing all namespace and attibutes using following code. You might find the required namespace-attribute mapping.
    IWDClientUser wdClientUser1 = WDClientUser.getCurrentUser();
    IUser user = wdClientUser1.getSAPUser();
    try
         String[] namespaces = user.getAttributeNamespaces();
         for(int i=0; i<namespaces.length; i++)
              response.write("<br>Processing namespace "+namespaces<i>);
              response.write("<br>==================================");
              String[] attributes = user.getAttributeNames(namespaces<i>);
              for(int j=0; j<attributes.length; j++)
                   response.write("<BR>ATTRIBUTE NAME="+attributes[j]);               
    catch(Exception e)
         response.write(e.getMessage());
    Also, check out UME API : http://help.sap.com/javadocs/NW04S/current/se/overview-summary.html
    Hope this helps.
    Regards,
    Vaibhav

  • Link b/w orclIsEnabled on OID and portal API calls wwsec_api.activate_user

    Hi Folks,
    I am just curious about the account status on OID and access on portal user profiles.
    Is account activation or deactivation in OAS portal (using wwsec_api.activate_portal_user/ deactivate_portal_user calls) related to the OID enable/ disable of an account using orclIsEnabled field?
    i think the portal api calls control the portal access in the wwsec_person$ tables. but does it also reflect on to the orclIsEnabled field?
    any guidance will be highly appreciated!
    AMN

    I'm not 100% positive but I do not think the portal account activation/deactivation calls change the orclIsEnabled attribute in OID since there are times when a user in OID may still be enabled for SSO purposes but that same user may be deactivated as a portal user.

  • Portal interview Questions

    Hi
    Could some one please send me some portal interview question....
    I dont want some links which refers to concepts.It would be better if it was some kind of a question &  answer series
    If u have any material please mail it to [email protected]
    Thanks in Advance
    Regards

    Hi,
    This has nothing to do with helping people implement a portal and therefore shouldn't be posted here. Nevertheless here are some links to previous posts on this subject:
    Enterprise portals Questions
    Portal interview and certification questions
    Portal Interview questions
    Roy

  • How to include Portal API's

    Hi,
    how can I include the Portal and the PCD GL API.
    Where can I get these .jar files?
    I installed the PDK and tried to get the jar's from there but I got an error by doing that. Also changing the property (as described) in the Visual Administrator did not work.
    Thanks in advance,
    Thomas

    Hi Francisco,
    I have to develop a Web Dynpro Tool, which should be able to create Folders, iViews, Pages ...
    in the Portal Content Directory. (Not with the Portal Admin Studio, but programmatically)
    Therefore I need the two API's (Portal API and PCD GL API)
    Under  <a href="http://help.sap.com/saphelp_nw04/helpdata/de/df/eb5c42da4de92ce10000000a1550b0/frameset.htm">help.sap.com</a>
    I followed the instructions to create an iView, but I wasn't able to include all the needed classes, because I can not find the .jar files (for these API's) to include into the DevStudio.
    I searched in the Filesystem and tried to get these files from the PDK, but I have not found it till now.
    Where can I find these files?
    com.sap.portal.ivs.api_iview_api.jar
    com.sap.portal.ivs.api_landscape_api.jar
    Thanks in advance,
    Thomas

  • Portal application sync using Portal APIs

    Hi All,
    I am trying automate the EBCC sync process using Portal APIs. I think it's very
    common since it avoids the manual sync process & helpful in creating batch process
    using Ant. Is anybody did this before??, please let me know if you have any suggestions
    etc.
    Many thanks
    Zulfi

    Many thanks Deepak, It works now...
    Cheers
    Zulfi
    "Deepak Shetty" <[email protected]> wrote:
    >
    should not url be
    http://localhost:7501/portalAppDataSync/DataSyncServlet ?
    also what does the server side log show? are you able to connect to your
    datasync
    servlet
    i am not sure whether this is a weblogic error caused due to some other
    reason
    i have only done this with 4.0 not 7.0 so im not sure if this works
    bye
    deepak
    "Zulfiqar" <[email protected]> wrote:
    I am posting the Ant script since it has been deleted by the system..don't
    know
    why.
         <property name="basedir1" value="C:/bea/user_projects/sourceDomain/beaApps"/>
         <property name="deploy.system.username" value="system"/>
         <property name="deploy.system.password" value="password"/>
         <property name="deploy.syncmode" value="refresh-from-client"/>
         <property name="url" value="http://localhost:7501/portalAppDataSync"/>
         <property name="basedir" value="C:/bea/user_projects/sourceDomain/beaApps"/>
         <property name="ebcc.lib.dir" value="C:/bea/weblogic700/ebcc/lib"/>
         <property name="weblogic.lib.dir" value="C:/bea/weblogic700/server/lib"/>
         <target name="Sync">
              <java fork="true" classname="com.bea.p13n.management.data.DirectoryDataSync">
                   <arg value="-root"/>
                   <arg value="${basedir1}/portalApp-project"/>
                   <arg value="-user"/> <arg value="${deploy.system.username}"/>
                   <arg value="-password"/> <arg value="${deploy.system.password}"/>
                   <arg value="-mode"/> <arg value="${deploy.syncmode}"/>
                   <arg value="-url"/> <arg value="${url}"/>
                   <classpath>
                        <pathelement location="${weblogic.lib.dir}/weblogic.jar"/>
                        <pathelement location="${ebcc.lib.dir}/ext/jdom.jar"/>
                        <pathelement location="${ebcc.lib.dir}/ext/HTTPClient.jar"/>
                        <pathelement location="${ebcc.lib.dir}/ext/p13n_system.jar"/>
                        <pathelement location="${ebcc.lib.dir}/ext/p13n_util.jar"/>
                   </classpath>
              </java>
         </target>
    Cheers
    Syed
    "Zulfi" <[email protected]> wrote:
    Thanks Deepak, i tried on this in Portal server 7.0 by writing the
    Ant
    script which
    is attached here. It gave some errors related to XMLMarshalling. The
    Ant script
    is,
         <property name="basedir1" value="C:/bea/user_projects/sourceDomain/beaApps"/>
         <property name="deploy.system.username" value="system"/>
         <property name="deploy.system.password" value="password"/>
         <property name="deploy.syncmode" value="refresh-from-client"/>
         <property name="url" value="http://localhost:7501/portalAppDataSync"/>
         <property name="basedir" value="C:/bea/user_projects/sourceDomain/beaApps"/>
         <property name="ebcc.lib.dir" value="C:/bea/weblogic700/ebcc/lib"/>
         <property name="weblogic.lib.dir" value="C:/bea/weblogic700/server/lib"/>
         <target name="Sync">
              <java fork="true" classname="com.bea.p13n.management.data.DirectoryDataSync">
                   <arg value="-root"/>
                   <arg value="${basedir1}/portalApp-project"/>
                   <arg value="-user"/> <arg value="${deploy.system.username}"/>
                   <arg value="-password"/> <arg value="${deploy.system.password}"/>
                   <arg value="-mode"/> <arg value="${deploy.syncmode}"/>
                   <arg value="-url"/> <arg value="${url}"/>
                   <classpath>
                        <pathelement location="${weblogic.lib.dir}/weblogic.jar"/>
                        <pathelement location="${ebcc.lib.dir}/ext/jdom.jar"/>
                        <pathelement location="${ebcc.lib.dir}/ext/HTTPClient.jar"/>
                        <pathelement location="${ebcc.lib.dir}/ext/p13n_system.jar"/>
                        <pathelement location="${ebcc.lib.dir}/ext/p13n_util.jar"/>
                   </classpath>
              </java>
         </target>
    You can also see the detailed information on the attached doc. Please
    let me know
    if anybody has any clue.
    Thanks
    Zulfi
    "Deepak Shetty" <[email protected]> wrote:
    For portal 4.0 i think
    <java fork="true" classname="com.bea.p13n.management.data.DirectoryDataSync">
    <arg value="-root"/>
    <arg value="${basedir}/ebcc/portal-project/application-sync"/>
    <arg value="-user"/>
    <arg value="system"/>
    <arg value="-password"/>
    <arg value="${deploy.system.password}"/>
    <arg value="-mode"/>
    <arg value="${deploy.syncmode}"/>
    <arg value="-url"/>
    <arg value="http://${deploy.bindaddress}:${deploy.port}/portalDataSync/DataSyncServlet"/>
    <sysproperty key="bea.home" value="${deploy.bea.home}"/>
    <classpath>
    <pathelement location="${deploy.wls6.home}/lib/weblogic.jar"/>
    <pathelement location="${deploy.wlp4.home}/lib/ext/jdom.jar"/>
    <pathelement location="${deploy.wlp4.home}/lib/ext/HTTPClient.jar"/>
    <pathelement location="${deploy.wlp4.home}/lib/p13n_system.jar"/>
    <pathelement location="${deploy.wlp4.home}/lib/p13n/ejb/p13n_util.jar"/>
    </classpath>
    </java>
    inside an ant target should be what you would want to do
    HTH
    deepak
    "Zulfiqar" <[email protected]> wrote:
    Hi All,
    I am trying automate the EBCC sync process using Portal APIs. I think
    it's very
    common since it avoids the manual sync process & helpful in creating
    batch process
    using Ant. Is anybody did this before??, please let me know if you
    have
    any suggestions
    etc.
    Many thanks
    Zulfi

  • Where are the Portal APIs located?

    The latest PDK does not seem to include the Portal APIs. Any ideas?
    Is it possible to make these APIs available on the PortalStudio site too.
    asiyam

    Hello,
    Is that image used as a fill in a rectangle ?
    If you right click in a Image frame you will the option for image properties. look at the screnshot.
    If you right click on a recangle that has an image used as a fill then you will not the option for image properties. look at the screnshot.
    If there is anyother scenario you are talking about please let me know and i will look in to it.
    Regards
    Vivek

  • Bea Portal Interview Questions

    hi ,
    Any body can send me Bea Portal Interview Questions.
    Please send it to me on my mail id that is : [email protected]

    Hey prabhakar,
    Can you please send the weblogic portal interview questions to me at [email protected]
    Please respond
    thanks in advance
    subrahmanyam

  • Java Portal API to determine the proxy?

    Hello,
    I am writing a JSP-based portlet, using the Apache SOAP 2.2 implementation to access a web service, and I need it to be flexible enough to access that service through a firewall. So I need to be able to pass a proxy host and port to the SOAP HTTP connect object. Rather than hard code the proxy address or create a customization page for the portlet where the proxy has to be manually set, is there a Portal API to determine the proxy server that's been set through the main admin screens?
    Thanks in advance,
    Mike

    I don't think there is a public API for this.
    Instead of hard-coding the proxy, make it a parameter of your servlet. The proxy is not something that will change very often (if at all) so it is a fairly safe bet.
    Using a servlet parameter also means that the proxy can be easiy changed if the installation is moved or the network is reconfigured

  • Portal API Documentation for 4.5ws

    Hi,
    Can anybody help me find Portal API documentation for 4.5ws on this site.
    Thank you,
    Lakshmi Narayana

    And because there are broken links like the "Provider Defnition XML Tag Reference v2" at
    http://www.oracle.com/technology/products/ias/portal/html/javadoc/xml_tag_reference_v2.html.
    Where is the XML tag reference?
    Thanks,
    HJB

  • Getting client IP address from PL/SQL Portal API

    I'm doing a customized login portlet where I'll like to get access to the IP address (I order to restrict admin access to specific IP addresses).
    Is that possible in the Portal API.

    Hi,
    Check this help.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/de/89023c59698908e10000000a11402f/frameset.htm
    You'll see that there is a param wdisp/add_xforwardedfor_header
    which
    "The parameter determines whether the SAP Web dispatcher includes the IP address of the client in the header field x-forwarded-for. If it does, the application on the application server can read the route that the request has taken. If the parameter has the value false, the Web dispatcher leaves the header field unchanged."
    Together with the forwarder field that I've mentioned earlier, this should achieve things you need.
    Eddy

  • Portal API's to display "page published as a portlet" using pl/sql

    I have a custom pl/sql portlet that we have developed. We want to programatically display the contents of another portlet which is a "portal page published as a portlet". I know when you have a provider portlet you can simply call it like this:
    portal.provider_name.show();
    But how do you display a page published as a portlet using portal API's?

    Nobody has a clue?

  • How do I access the remote(requesting) clients IP address through the Portal API?

    How can I access the remote(requesting) clients IP address through the Portal API?
    On our 4.5 - IIS system, we can acces it using the Request.ServerVariables("Remote_Addr") in the ASP pages.
    We are deploying 5.0 on Java Portal and would like to be able to do this through the Portal's API so I can call it in one of our custom login Activity space or control etc.
    I have looked documentation for the HTTPServletRequest object. It seems like we should be able to access it through one of the methods getRemoteAddr if we can get a handle to HTTPServletRequest object through the Plumtree's framework.
    I think the XPRequest object encapsulates the HTTPServletRequest but I didn't see getRemoteAddr method listed in the Javadocs.
    Is there a way to access the client's IP address through the Plumtree's framework?
    I need to do this so we know the location of the user and in our business case we have fixed IP adresss which let us identify which location is user accessign the system from. We can't do this through preferences or profile because we have to use generic userid for the specifc group of users.
    Any help on this would be appreciated.
    Thanks.
    Vanita

    Hi, Vanita. For now, you can use
    stringsClientIP = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString();
    Hope that helps!
    Sarah

Maybe you are looking for

  • Sales Orders Transparent Tables Needed

    I am trying to create a report with SQV1 that shows Sales Order  Sales Order Status Material Rev Level on Material ECN Number on Material ECN Description on Material I need the transparancy tables for Sales Order Detail; I tried VBAP and VBAK and bot

  • Problem sending to soundtrack pro

    I am using FCP 5.1.4 and in my timeline I have a clip with bad audio that i want to clean up in soundtrack. I right-click the file and go to "send to.." "soundtrack pro audio file" is greyed out, but the multitrack option is not, so i tried the multi

  • 5800 XpressMusic will not connect to OviSuite an...

    The apps don´t recognize it.  On the phone, no USB icon shows up on the taskbar when I activate PC Suite mode.  But when I connect or disconnect the cable to the PC, I can hear the "new hardware found" sound - usually more times in a row.   It was al

  • Schema or XML

    Hi All, I have used both XML Schema and XML data connections in forms. I have few questions, 1) How do I know when to use Schema or XML? 2) When both the options are available, which one to use Schema or XML? 3) Also, how do i preserve data binding a

  • CD-ROM Suite to Laptop with No CD-ROM

    Good afternoon, I was wondering if it was possible transferring a creative suite to a laptop that I have that has no CD-ROM? I Know this probablysounds dumb, but adobe was able to disable my registration from a laptop that was stolen so i can registe