Page Imports in Abstract Portal Component

Hi,
I have created an abstract portal component where I have called a JSP using IResource.
The JSP is called and displayed.
<%@ page import = "java.util.*;" %>
<%@ page import = "com.sapportals.portal.prt.component.*;" %>
<html>
<body>
hello
</body>
</html>
In my JSP the moment I add the second import i.e. prt.runtime, it throws an error when I run the application:
Error when rendering jsp.
Am I missing out something?

Hi Prem,
Add that particular jar file in the lib folder of your application and also add it to the build path of your project properties.
<b>Project -> Properties -> Java Build Path -> Libraries</b>
Add to this build path as well.
I hope this helps you.!!
Regards
Pravesh
PS: Please consider rewarding points if solved and helpful.

Similar Messages

  • Difference between Abstract portal Component and JSPDyn page.

    Hi Experts,
    What is the difference between Abstract portal Component and JSPDyn page.
    Thanks,
    Jay.

    Hi,
    The PDK provides two methods for creating a portal component:
    Abstract Portal Component
    The Abstract Portal Component class offers a lean method for writing HTML commands to the Web client as well as for basic event handling. It is an implementation of the IPortalComponent, which is the central abstraction of the Portal Component API.
    DynPage
    The Page Processor Component, which extends the Abstract Portal Component, returns a DynPage. It provides more sophisticated event handling. Controls that produce events (such as buttons and checkboxes) have an event attribute that contains the name of the event handling method. This event handling method is invoked by the DynPage when it occurs.
    The JSPDynPage is an implementation of the DynPage and allows the use of the DynPage in combination with JSP (Java Server Pages).
    The PDK documentation and examples focus on the DynPage. Easier event handling and the separatation of content development (JSP) from application development (Java) make the DynPage a better choice for components with interaction and changing content.
    For more details, Refer thes thread,
    https://fortress.wa.gov/dop/portal/irj/portalapps/com.sap.portal.pdk.basic.portalcomponentimplementation/docs/jspdynpage.html
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0b3e9d5-b2af-2a10-20ba-9f6ce6b1a27f
    Hop it helps..
    GS
    Edited by: Sathishkumar GS on Apr 14, 2008 2:07 PM

  • Urgent Please help me... How to access BAPIs from abstract portal component

    I am developing an application in Abstract Portal Component (in
    PDK).
    In that application I can able to acess BAPIs from my Componets
    using the code like
    inputPopSearchBapi = new Zad_Bapi_Pop_Search_Form_Input();
    outputPopSearchBapi = new Zad_Bapi_Pop_Search_Form_Output();
    popSearchBapi = new DropBox_PortType();
    colorList = new Tjj12Type_List();
    inputPopSearchBapi.setIm_Agencyid("0010000001");
    try {
    jcoClient.connect();
    outputPopSearchBapi =
    popSearchBapi.zad_Bapi_Pop_Search_Form(inputPopSearchBapi);
    colorList = outputPopSearchBapi.get_as_listIt_Color();
    request.getComponentContext().putValue("color",colorList.iterat
    or());
    jcoClient.disconnect();
    But I am not able to Access the data that is comming from the
    BAPI in my JSP Page. Pleeeeeeease help me. If you want any
    clarification about my problem then ask for further
    clarifications

    Hi,
      You can refer this link, to connecting the BAPI from Abstract Portal Component <a href="http://www.huihoo.org/openweb/jco_api/com/sap/mw/jco/JCO.html">JCo Tutorial1</a>
    <a href="http://www.apentia-forum.de/viewtopic.php?t=1962&sid=9ac1506bdb153c14edaf891300bfde25">JCo Tutorial2</a>
    With Regards,
    Venkatesh. K
    /* Points are Welcome */

  • Abstract Portal component - KM Html

    Hi,
    We are developing an external facing portal wherein the Home page has 6 components. In that 5 components are static components which refer to the HTML file in the KM repository. For that I have made KM document iview and given the path of the HTML file.
    But as it is an internet page and as its loading time should be less, we planned to make each component as an abstract portal component which refers the HTML file in the KM and displays the same.
    Can somebody tell me as to go about it?
    Thanks & Regards,
    Ganesh N

    solved

  • How to use UI elements in abstract portal component

    hi all
    i am new to portal development..i want to use different UI elements such as textbox,buttons using abstract portal component.can anyone telme how to use them.

    Yes Asusha
    You can use JSP , JSPDyn pages in Abstract portal component.
    You can call a Jsp file from the abstract portal component.
        public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
         com.sapportals.portal.prt.resource.IResource somePage =          
                   request.getResource("jsp", "pagelet/test.jsp");
                   response.include(request, somePage);
    Then you can made your desired UI in JSP.
    Hope this helps..
    Cheers
    Chinmaya
    Reward for helpful answers

  • Use WebDynpro JCO Destination in Abstract Portal Component

    Hello,
    I was wondering if it is possible to use a WebDynpro JCo Destination in an Abstract Portal Component? I have a portal component that make as JCO call to run an rfc. I get the MYSAPSSO2 ticket from the cookie and pass this in to the JCO client. This works fine. Now I need to be able to run this for anonymous users as well. I was hoping to be able to retrieve a WebDynpro JCo destination that is set up as a userid/password type and use this to make the connection to run my RFC. This way I could avoid having to store the userid and password somewhere and encrypt/decrypt  it etc...
    Thanks,
    Bert

    Yes Asusha
    You can use JSP , JSPDyn pages in Abstract portal component.
    You can call a Jsp file from the abstract portal component.
        public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
         com.sapportals.portal.prt.resource.IResource somePage =          
                   request.getResource("jsp", "pagelet/test.jsp");
                   response.include(request, somePage);
    Then you can made your desired UI in JSP.
    Hope this helps..
    Cheers
    Chinmaya
    Reward for helpful answers

  • Accessing portal service from abstract portal component

    Hi
    I have created a portal service where it contains getdata() and putdata(String) methods.
    I have created a abstract portal component and trying to access the portal service from this component.
    In portalapp.xml file of the portal component i have created the sharing reference and i have given the service name.
    When i run the component it says service not found.
    Please let me know if i have missed some things
    Thanks and Regards
    NagaKishore

    Hi Prakash
    Sorry for the latereply.
    find below the code for the interface
    package com.sap.global;
    import com.sapportals.portal.prt.service.IService;
    public interface IGlobalContext extends IService
        public static final String KEY = "IGlobalContext.GlobalContext";
        public void putData(String strUserID,String strSessionID);
        public String getData();
    portalapp.xml file of the portal service.
    <application>
      <application-config/>
      <components/>
      <services>
        <service name="GlobalContext">
          <service-config>
            <property name="className" value="com.sap.global.GlobalContext"/>
            <property name="startup" value="true"/>
          </service-config>
          <service-profile>
            <property name="Test" value="true"/>
          </service-profile>
        </service>
      </services>
    </application>
    I am doing the following steps to access the portal service in the abstract portal component.
    1. Add the portal service to the java build path of the abstract portal component.
    2. do content method has the following code.
    String userid ="",sessionid="";
              response.write("Welcome");
              try
              IUserContext uc= request.getUser();
              userid = uc.getLogonUid();
              sessionid = request.getServletRequest().getSession().toString();
              response.write("Iview "+userid);
              IGlobalContext uid = (IGlobalContext)PortalRuntime.getRuntimeResources().getService(IGlobalContext.KEY);
              uid.putData(userid,sessionid);
              response.write(" Response from Service " + uid.getData());
             }catch (Exception e)
                  response.write(e.toString());
    3. portalapp.xml of abstract portal component
    <application>
      <application-config>
        <property name="SharingReference" value="GlobalContext"/>
      </application-config>
      <components>
        <component name="LandingPageComponent">
          <component-config>
            <property name="ClassName" value="com.satyam.landing.LandingPage"/>
          </component-config>
          <component-profile/>
        </component>
      </components>
      <services/>
    </application>
    I am getting the following error.
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    Could not find portal application GlobalContext.
    Exception id: 11:53_08/04/05_0095_1641450
    See the details for the exception ID in the log file
    Thanks in advance
    Regards
    NagaKishore

  • IPortalComponentRequest in JSP from Abstract Portal component

    Hi,
    I have an abstract portal component like this:
    import com.sapportals.portal.prt.component.*;import com.sapportals.portal.prt.resource.IResource;public class Nav2 extends AbstractPortalComponent{    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)    {          IResource jspResource = request.getResource(IResource.JSP, "jsp/Nav2.jsp");          response.include(request, jspResource);    }}
    Now in the called JSP, I want to use the request object.
    e.g.
    Hashtable env = new Hashtable();env.put("NavigationPrincipal",request.getUser());
    But, the request object is not available.
    How to I get the same object available here?

    Hi Praveen,
    Thanks for the solution but I get some error when I add
    String theCall = service2.createAbsoluteNavigateClientCall(myNavNode.getName(),IClientNavigationGenerator.SHOW_INPLACE,null,null);
    The code is like this:
    import com.sapportals.portal.prt.component.*;
    import com.sapportals.portal.prt.resource.IResource;
    import java.util.*;
    import com.sapportals.portal.navigation.*;
    import com.sapportals.portal.prt.runtime.*;
    import com.sapportals.portal.prt.session.IUserContext;
    import com.sapportals.portal.prt.util.StringUtils;
    public class Nav2 extends AbstractPortalComponent
        public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
              //IResource jspResource = request.getResource(IResource.JSP, "jsp/Nav2.jsp");
              //response.include(request, jspResource);
              response.write("hello india");
              Hashtable env = new Hashtable();
              env.put("NavigationPrincipal",request.getUser());
              INavigationService service = (INavigationService) PortalRuntime.getRuntimeResources().getService(INavigationService.KEY);
              INavigationNode myNavNode = service.getNodeByQuickLink(env,"help");
              IClientNavigationGenerator service2 = (IClientNavigationGenerator) PortalRuntime.getRuntimeResources().getService(INavigationService.KEY);
              String theCall = service2.createAbsoluteNavigateClientCall(myNavNode.getName(),IClientNavigationGenerator.SHOW_INPLACE,null,null);
    Can you please help out on this one?
    Thanks

  • Redirecting from an abstract portal component

    Hi,
    I'm trying to redirect from an abstract portal component to a quicklink. I do it like told in this thread:
    Redirecting to external website from abstract portal component?
    private void redirectUrl(String target, IPortalComponentRequest request) {
      try {
        HttpServletResponse resp = request.getServletResponse(true);
        resp.sendRedirect("../../../../portal/" + target);
      } catch (IOException e) {}
    It works, but the content of my target-URL is still in the Portal-Frame. So I've two time the Portal-Framework-Navigation. Something like this:
    | Welcome         |
    | Welcome         |
    | content         |
    |                 |
    |                 |
    |                 |
    My goal is to redirect the whole page, not only the frame.
    Thanks for any help...
    Regards, Markus

    Perhaps I can do it with
      public void doOnNodeReady(IPortalComponentRequest request){
        request.redirect("http://www.google.de");
    But like in this Tread, it didn't work AbstractPortalComponent and doOnNodeReady

  • Refreshing a Abstract Portal Component in Specific Intervals

    Hi All,
    I have developed an Abstract Portal Component which reads Data from an XML File which is stored in KM.
    Requirement :
    I need to REFRESH this iView for every 5 Minutes-Automatically (Just like Websites showing Live Cricket Scores), to read the Updated Data from that XML File. The XML File will be updated every 5 mins.
    If anybody has Idea on this, Please Guide me..
    Thanks in Advance.
    Regards||
    Ashok Kumar M.

    Here are the instructions for Client-Pull method using meta tag
      1. Use META in the HEAD section of your document.
       2. Write HTTP-EQUIV and CONTENT in META to accomplish client-pull.
    Examples
    To reload the document itself:
    HEAD
    META HTTP-EQUIV=REFRESH CONTENT=5
    HEAD
    CONTENT=5 means wait for 5 seconds to reload the page.
    To load visitors to another page:
    CONTENT=5 means wait for 5 seconds to reload the page.
    To load visitors to another page:
    HEAD
    META HTTP-EQUIV=REFRESH CONTENT="5;URL=http://mbiz.co.th/tips_tricks/"
    HEAD
    URL=...... This is the URL of the page you want to load a visitor to.
    using java script window location you can refresh the page
    like window location equals your location
    and call the method which contains window location in body onload
    Edited by: Supraja Koganti on Nov 17, 2008 10:08 AM

  • Abstract Portal Component VS Dynpage

    Can any one explain the differences between Abstract portal component and JSP DYN PAGE?
    When to use where ?
    How can we provide communication between iViews with in the same component / different components.
    Useful answers will be rewarded with points.
    Thanks

    Mohan,
    Abstract portal component as it says its an abstract component .In portal applications we have certain requirements which include only some business logic to be implemented ,for such cases u write the function in abstractportalcomponent and use this as a single entity.It generally not used for building applications with UIs..
    So for a portalapplication wher u need to include UI,controller,and databased/Backend connectivity .JspDynpage suits here.It is the framewrk provided which has JSP view,java controller,and beans model..
    For instance if u have developed a user login form and saving it to database.
    U develop it using JSPdynpage.
    But her if u have an enhancement of including the page to be printed.
    U can create a abstractportalcomponent and use it in earlier Jspdynpage.
    So advatage is modular specific business process can done and integrated with an application..
    Future advancements is easy.
    for performance info check this
    <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3fbea790-0201-0010-6481-8370ebc3c17d">pdf</a>
    Thanks,
    Swathi

  • Event Handling in Abstract Portal Component

    Hi Friends,
    I am using HTMLB Classlib in an Abstract Portal Component to develop a Dropdownlistbox. Now I want to handle the event of change of selection in this dropdown. However, this event is not getting captured. Sample code is as follows:
    public class dropdownsimple extends AbstractPortalComponent
                           public void onClick(Event event)
                           public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
                                                    IPageContext myContext1 = PageContextFactory.createPageContext(request, response);
              Form myForm = myContext1.createFormDocument("CRMForm");
              GridLayout myGrid = new GridLayout();
              DropdownListBox drp = new DropdownListBox("drp");
              drp.addItem("Key 1","Item 1");
              drp.addItem("Key 2","Item 2");
              drp.setOnSelect("onClick");
                                                     myGrid.addComponent(1, 1, drp);
              myForm.addComponent(myGrid);
              myContext1.render();
    I am able to see the dropdown box along with values when I preview the PAR iView created from this component. Please let me know how to capture the event of change of selection in the dropdown?
    Edited by: Shetul Chothani on Jun 21, 2011 6:37 AM

    Hi,
    Change this line
    drp.setOnSelect("onClick");
    to
    drp.setOnSelect("click");
    and leave the line
    public void onClick(Event event)
    as it is, and it should work just fine.
    I.e., if you name your event "fooBar", the event handler should be named "onFooBar"
    Cheers,
    Robin

  • Stop/Kill a Abstract portal component

    Hi All,
    I am working on EP 7.0 version.
    I have created a Abstract Portal component and uploaded the par file using Portal Archive tool.
    I ran the component by executing the url as below:
    http://<hostname>:<Port no>/irj/servlet/prt/portal/prtroot/Parfilename.ComponentName.
    The componet is having a bug and it is running in an infinite loop.
    Please let me know how to stop/kill this component as its logging some statements infinitely.
    Thanks in Advance,
    -Pavan

    Hi,
    You'll need to restart the server.
    Regards,
    Alex

  • How to Link another JSP Page in the same portal component

    Hi Guys,
      I am a new guy to SAP, currently, I want to add href link to another JSP in the same component, so I used <a href="<%=webpath%>/jsp/AboutPage.jsp">, but obviously, the link can not display target page due to privilege restriction, does anyone know how to resolve this problem? thanks very much!
      Best Regards
      James

    Thanks srinivas,
       Sorry for late response, too busy yesterday.
       Currently, I want to create a URL link in the page which links another JSP page in the same portal component, but the problem is this JSP page is under PORTAL-INF folder, so due to privilege problem, I can not create the link like the following:
    <a href="jsp/test.jsp">Link</a>
       I konw if I move test.jsp out of folder PORTAL-INF, the above way should work, but then, I found the JSP page can not access componentRequest and get resource bundle object.
      Am I clear, please let me know, thanks!
    Regards.
    James

  • Reading Session Variables in Abstract Portal Component/ JSP Dynpage or Java

    Hi All,
    I have a web dynpro for Java component which passes parameters in a session and also navigates to a Java application.
    Now when I try to read the session parameters in the Java application (JSPDynpage or Abstract Portal Component) I cannot retrieve the values.
    Can someone throw light on how I can achieve this within a Java application.
    Code is as enclosed below -
    WD for Java Code
      public void onActionClicked(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionClicked(ServerEvent)
    IClientSession session = Utils.getCurrentClientSession();
    IScope scope = session.getScope();
    scope.put("TestSession", wdContext.currentContextElement().getTxtValue());
    WDPortalNavigation.navigateAbsolute(
    "ROLES:portal_content/com.be.pct.cr.Test/DynProToNet",
    WDPortalNavigationMode.SHOW_INPLACE,
    (String)null,
    (String)null,
    WDPortalNavigationHistoryMode.NO_DUPLICATIONS,
    (String)null,
    (String)null,
    (String)null);
        //@@end
    Code within the Abstract Portal Component doContent method is -
    IPortalComponentSession ses;          
    ses = request.getComponentSession();
    String TestSession = new String();
    String sTest = new String();
    String sTesting = new String();
    if(ses.getValue("TestSession")!= null){
    TestSession = ses.getValue("TestSession").toString();
    if(request.getParameter("TestSession")!= null){
    sTest = request.getParameter("TestSession");
    if( request.getValue("TestSession")!= null)
    sTesting = request.getValue("TestSession").toString();
    response.write("Display"TestSessionsTest+sTesting);
    Any help is highly appreciated.
    Thanks in advance,
    Divya

    Hi,
      Why not use eventing between webdynpro and portal applications? That would be more easy. Check these documents.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60d7d690-0201-0010-e581-9c4fc69cec0e
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d48eaa90-0201-0010-58a8-887fc8632c3c
    Regards,
    Harini S

Maybe you are looking for

  • How do I transfer all my data to Iphone 5c?

    I just bought and activated the Iphone 5c. How do I transfer my settings, photos, apps, text messages, etc., from my Iphone 4?

  • CRVS2010 Beta - Cannot find documentation on what needs to be installed

    My question is very elementary but I do not see anything in the release notes, etc. that tells me which of the 3 install files I need to iinstall or do I need to install all of them. 1 - SAP Crystal Reports, version for Visual Studio 2010 2 - SAP Cry

  • Multiple FLVs loaded properly

    Ok, On my main timeline i have some buttons. When you click a button you are diverted to the a frame label on the main timeline. When the timeline stops at say frame 2 an flv is loaded into an empty movie clip on the main stage.  If you click on butt

  • RFC_ERROR_LOGON_FAILURE: User account not in validity date

    Dear All We are trying to upgradfe one of our ECC system to EHP4. We created a system in the solution manager. However, it had some problems and we tried to delete it. During deletion, we are receiving an ABAP dump as "CALL_FUNCTION_REMOTE_ERROR". De

  • IPad as a gift

    I've bought an iPad (wi-fi) for my mother's 80th birthday. She lives in Spain. I want to set it up for her, load some photos, link an email account, stuff like that. I'd love to load a few apps for her too. I'm hoping someone will help me out here -