Insert a JSP in a portal application project

Hi,
I have created a portal application project but I am unable to create a JSP file in it. When I right click on my project then new and JSP file, a window appears asking me to fill the name of the jsp file I want to create and the folder in which I want to create it. The problem is that there is no folder in my application. How may I do ?
Thank you for your help.
Thibault Schalck

Hi Thibault schalck,
For JSP file you need to create a JSPDynPage Portal Component.For that just right click on your project select NEW->Other->Portal Application->Create a new portal application object
Expand the Portal Component and you will get JSPDynPage. Select it.
Then give all the general description i.e. Name,JSPDynpage class name,JSP filename.....
Your JSP File will get created under Pagelet folder by default.That you will get from......
Just Expand dist folder then PORTAL-INF then pagelet.
Hope this info helps you.
Regards,
Swati

Similar Messages

  • Need Help in Portal Application Project

    I am developing a Portal Application Project where i need to use AJAX to show database values in the main JSP.
    Now while doing an AJAX call (the open method) i need to pass a server pages' URL.
    I have a second jsp file in my application(pagelet/second.jsp) which will do all the database functions and writes the values to stream.
    Now i am confused how to call this second jsp from my first jsp.
    Please help !!!
    SAP WAS 7.0

    I have a second jsp file in my application(pagelet/second.jsp) which will do all the database functions and writes the values to stream.
    May I ask why you are using a JSP page for this? The answer written back will include some standard SAP Portal HTML code that you don't need in the AJAX response (like: <html>...)
    I'm using portal components as AJAX "receiver" and not JSP pages, simply because it gives me greater control over the response::
        <component name="Ajax">
          <component-config>
            <property name="ClassName" value="xyz.Ajax"/>
          </component-config>
          <component-profile/>
        </component>
    And in the Java class:
    public class Ajax extends AbstractPortalComponent {
        public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)  {         
    br,
    Tobias

  • Can't create portal application project with netweaver development studio

    Hi All,
    I want to follow the toturial (http://help.sap.com/saphelp_nw04/helpdata/en/9e/7d96f7087311d7b84600047582c9f7/frameset.htm) to create a portal application with netweaver , but I am failed at the first step, I can not found "Portal Application Project" option by new->other.
    the version of netweaver development studio I am using is
    Version: 7.2.0
    Build id: 200702220224
    do I need to install a plug - in? if yes, anyone can tell me where to download it?
    thanks & regards, Bin

    Hii...
    In NWDS goto Windows> Open Perspective> others--> Enterprise portal select this and ok....
    Goto File> New> Project> select Portal Application> enter project name and click ok...
    refer this blog also...
    Overview of the Content Development Process
    regards,
    Chinnadurai.R

  • SAP Netweaver development studio 7.1 - No Portal Application Project

    File>New>Project> Portal Application Project missing in drop down list.
    What NWDS properties or enhancement packs or support packs need to be loaded to create a Portal Application Project?
    Thanks in advance.

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5f3ee9d7-0901-0010-1096-f5b548ac1555
    Check according to this.
    I think one more thread specifying same issue.

  • Portal Application Project URL

    In 7.0 we can run application from portalapp.xml with run command. In 7.3 no button for this. What is the url of application?

    http://<server>:<port>/irj/servlet/prt/portal/prtroot/<project name>.<component name>

  • How to include .css file into jsp file in portal application

    Hi,
    I have included a .css file in a .jsp file using following tag :
    <link rel="<%=componentRequest.getWebResourcePath()%>/css/ts.css">.
    I have kept .css file under /dist/css folder.
    Preview of jsp file is fine but when I upload the jsp file and .css file to server, Look and feel of the screen is changing. When I paste the style code in jsp file, look and feel is fine.
    Can some body suggest me that why the look and feel is changing when I put the style code in css file and include it in jsp.
    Thanks in advance.
    Manish

    Hello
    We're using <link rel="stylesheet" type="text/css" href="http://ourserver/eclib/css/ecstandard.css">
    between <head> and </head>
    It works.
    Hope it helps.
    Regards
    Benoit

  • Fetching data in R/3 via portal application(JSPDYNPage)

    Hello Everyone,
                           I want to fetch data in R/3 server via portal application(JSPDYNPAGE) & display that data as an output of the portal application in TABLEVIEW format. Can anyone guide me on this (I:e-How to connect to R/3 server via portal component & fetch data & display the same). any similar application developed for a reference will be of great help.
    Thanks,
    Chetan

    Hi Chetan,
    I hope you know how to create a JSP Dyn Page, anyway I will explain it briefly.
    Open NWDS->File->New->Create a portal application project->Specify the project name
    right click on the project->New->Create a new portal application object->Portal component->Select JSP dyn page-(By default it creates class and all)->this is available under description on the right column-
    Now goto the Java page->see the functions->attach zip and jar files(HTMLB plugin)
    ->Right click on the project->goto properties->Java build path->Add external jars->Select com.sap.portal.htmlbbridge.zip and htmlb.jar
    This is how JSP page is created.
    Now we want to do establish connection with R/3. That I will discuss in the next session.
    Award points if this was helpful......
    All the best for you
    Regards,
    Arun Jacob.

  • Error with response object in Portal Application Module

    Hi,
    i have a portal application project in NWDS, with a JspDynpage component. I have a jsp that contains this code:
    OutputStream os = componentResponse.getServletResponse().getOutputStream();
    response.addHeader("Content-Disposition", "attachment;filename=" + sTITLE +".pdf");
    response.setContentType("application/pdf");
    os.write(contenido);
    os.close();
    this code open a pdf in new window. In web module project that app runs correctly but in portal application no, it fails in object response. the log (in default trace) doesn´t help me nothing, only sais:
    Jun 6, 2011 3:19:55 PM     com.sap.portal.prt.runtime.servlet_jsp [SAPEngine_Application_Thread[impl:3]_13] Error: >>> JSPCompiler >>> ERROR in Compiling :JSPFileInfo :314221189
    JSP File : /usr/sap/DP4/DVEBMGS40/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/appl.factdist.efact.por/pagelet/inicio.jsp
    Class Name: sapportalsjspInicio
    Java File : /usr/sap/DP4/DVEBMGS40/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/appl.factdist.efact.por/work/pagelet/_sapportalsjsp_inicio.java
    Package Name : pagelet
    Class File : /usr/sap/DP4/DVEBMGS40/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/appl.factdist.efact.por/work/pagelet/_sapportalsjsp_inicio.class
    Is out dated : false [email protected]bbc2b
    In addition, i can use the request object perfectly
    somebody knows what's happening??
    Thank you,
    Fernando

    Hi,
    You shouldn't use the response object directly
    Instead, create a new HttpServletResponse reference from the componentRequest object.
    Try using the following:
    long length = file.length(); // where 'file' is a File() object of your sTITLE +".pdf" file
    // Create the byte array to hold the data
    byte[] bytes = new byte[(int)length];
    int offset = 0;
    int numRead = 0;
    while (offset < bytes.length && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
        offset += numRead;
    //The most important part:
    HttpServletResponse res = componentRequest.getServletResponse(true);
    res.setContentType("application/pdf");
    res.addHeader("Content-Disposition", "attachment;filename=" + sTITLE +".pdf");
    res.getOutputStream().write(bytes);

  • How can debugge the portal application

    hi sdn,
    how can we debugge the portal application.what are steps are needed for this
    any documents please forward me.

    Hi Kiran,
        Following is the steps for debugging the portal application.
    <b>Steps for Debugging</b>
    <i><b>1.     Stop the Portal Server if Running.</b></i>
    <i>
    <b>2.     Launch the Config tool of J2EE Engine & Set Up the debugging of the     current instance.</b></i>
    &#61607;     The Config tool is located in the directory ,
    <J2EE-Install-Dir>\JC00\j2ee\configtool\configtool.bat
    &#61607;     Switch to the current instance & go to the debug tab.
    &#61607;     Set “Enable Debug Mode” checked, start the VM of J2EE in debug mode.
    &#61607;     Set a valid debug port, default port is 50021.
    &#61607;     Save the settings and restart the J2EE Engine.
    <i><b>3.     Restart the Portal Server.</b></i>
    <i><b>4.     Open SAP Netweaver Developer Studio.</b></i>&#61607;     Go to Window --- > Open Perspective --- > Enterprise Portal & also open the Debug perspective.
    &#61607;     This enables you to develop & deploy EP Components to your development Portal.
    <i><b>5.     Configure Development Environment for Debugging.</b></i>
    &#61607;     Create new Remote Java Application debug settings.
    &#61607;     Pressing the debug button attaches the SAP Netweaver Developer Studio to the Specified portal installation.
    &#61607;     Go to Debug --- > Remote Java Application & create a new setting for your current Portal Application Project.
    &#61607;     Insert the portals DNS or IP Address and the debug port specified in the Config tool, default port is 50021.
    &#61607;     If the portal runs on the local machine you can enter localhost instead of IP address or DNS name.
    &#61607;     Make sure that your Portal Application is already deployed in the portal.
    <i><b>6.     If the connection is attached to the J2EE engines VM session, the SAP Netweaver Studio is ready to debug.</b></i>
    <u><b>BREAKPOINTS</b></u>
    <i>A Breakpoint causes the execution of a program thread to suspend at the location here the breakpoint is set.</i>
    <i><b>7.     Set a breakpoint in your custom coding. The debugger will stop if the VM reaches this marked code line.</b></i>
    To enable the breakpoint,
    &#61607;     Locate the breakpoint in the marker bar of an editor.
    &#61607;     Open the breakpoint’s context menu & select  ‘Enable Breakpoint’.
    &#61607;     The breakpoint image will change back to a blue circle.
    <b>VARIABLE VIEW</b>
    <i>The “variables view” contains information about the variables in the currently-selected stack frame.</i>
    <i><b>8.     To Launch the Variables View :,</b></i>
    Choose Window -- > Show View -- > Other -- > Select Debug -- > Variables View.
    <i><b>9.     Force the Portal to execute your deployed coding.</b></i> The VM stops at the specified break point.
    10.     The current values of the member variables can be tracked in the “Variables” window of SAP Netweaver Developer Studio.
    <i><b>** Reward points if you find this Post Useful & Helpful.</b></i>
    <i>Regards,
    Eben.</i>

  • Access to Entity Service from Portal Application

    Hi Experts,
    I have a hybrid application which will be making use of both Web Dynpro and Portal Applications. I decided to use Entity Services to store my back-end data and can access it fine from the Web Dynpro project. I have included the public part of my CAF project into the Used DCs of my Portal project and while I am able to call the methods of the Entity Service at compile time, at runtime I receive an error message on the page:
    An exception occurred while processing a request
    I know in order to get this to work for Web Dynpro I had to include sap.com/tccolapi.sap.com/cafruntimeuicouplingapilib as a Library Reference and a few Used DCs, but while I have added the Used DCs to the Portal project, I am unsure of how to add the Library Reference. I assume this has to be added to portalapp.xml, but I don't know the syntax.
    Could somehow please reply with how to do this and whether this is all that is required in order to call Entity Service methods from Portal applications?
    Thanks,
    JP

    Hi Smith,
    Write click on the Project then goto the Properties=>Webdynpro References=>Library references
    add
    caf/eu/gp/api
    sap.com/cafruntimeuicouplingapilib
    And add the following DC in your project.
    1> External in caf/eu/gp/api (CAF domain)
    2> caf/eu/gp/api/wd (CAF domain)
    3> com.sap.security.api.sda (SAP-JEE)
    portalapp.xml
    <?xml version="1.0" encoding="utf-8"?>
    <application>
    <application-config>
    <property name="SharingReference" value="usermanagement, knowledgemanagement, landscape, htmlb, exportalJCOclient, exportal, SAPJ2EE::library:cafeugp~api"/>
    </application-config>
    <components/>
    Check this thread .
    Using CAF GP API in Portal Application project
    Regards,
    Mithu

  • Java class reference error in Portal Application

    Hello,
    I have created a Portal Application Project with the Class
    "public class TEST extends AbstractTestComponent implements ITestable"
    in order to test the application.
    The test works fine with a simple code.
    Instead, using the external class HSSFWorkbook in order to create an excel file, the Enterprise Portal Unit Test return the following error:
    "java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook"
    I have tried to put the ZIP file of class into the folder "dist/PORTAL-INF/lib" and "dist/PORTAL-INF/exlib" but it doesn't work.
    Can someone tell me what I have to do?
    Thanks and best regards,
    Matteo.
    Edited by: Matteo De Santis on Feb 10, 2009 7:22 PM

    Hi,
    note that a portal application has two classloaders. one for the public part (src.api) and one for the private one (src.core).
    portal components reside in src.core by default. this means you need to load your jar file to the private class loader.
    so instead of dist/PORTAL-INF/lib use dist/PORTAL-INF/private/lib
    Regards, Lior

  • POrtal application object - Abstract Portal Component, Location dropdown.

    Hi
    I am creating a Portal application project in NWDS.
    Inside this project I am creating a POrtal application object -> Abstract Portal Component.
    Now, there is a dialigue box which appears, prompting for object name and package.
    In the same dialogue box there is an additional dropdown box for Location.
    It has two values "api" and "core".
    What does these mean.
    Thanks

    The location of the new Java class file determines whether other applications can reference the classes. Generally, the choice is only meaningful when defining services and the interfaces to make available to those applications the reference the service.
    You can specify one of the following:
    ■      Core (default): Places the file in the src.core project directory, and makes it private.
    ■      API: Places the file in the src.api, and makes it public.
    Regards,
    Khushboo

  • Portal Application Java / IView : Setting a property

    Hi!
    Please help me to solve this problem!
    I have got an IView with a Height of 200; now i have to modify this value with a Portal Application.
    Here comes the code....:
    if (request.getComponentContext().getProfile().isPersonalizableProperty("com.sap.portal.iview.Height")){                   
    System.err.println("Original Value "+request.getComponentContext().getProfile().getProperty("com.sap.portal.iview.Height"));
    System.err.println("Setting");
                              request.getComponentContext().getProfile().setProperty("com.sap.portal.iview.Height","100");
    System.err.println("Checkpoint");
                      request.getComponentContext().getProfile().store();
             System.err.println("New Value "+request.getComponentContext().getProfile().getProperty("com.sap.portal.iview.Height"));
    Now:
    1)Deploy
    2)IView Preview
    LOG :
    Orignal Value 200     
    Setting
    Checkpoint
    New Value 200
    The new value should be 100....not 200.....
    Where is the mistake?!???!
    Thanks.

    Hello,
    I have tried the code on my end and i was able to change the height property value.
    Check this code here i have created a portal application project:
    Hashtable 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, PcmConstants.ASPECT_SEMANTICS);
    InitialContext iCtx = null;
    iCtx = new InitialContext(env);
    IiView result;
    result =(IiView) iCtx.lookup("pcd:portal_content/Test1/com.local.New1");
    result.putAttribute("com.sap.portal.iview.Height","100");
    result.save();
    and also you have to include the references in the portalapp.xml
    Let me know for more information.
    Hope this helps you.
    Thanks.

  • Where I can creat a new portal application?

    hello:
       I want to <u>Create a new Masthead Component</u>:
      a) Go to System Administration – Support – Support Desk – Portal Runtime – Browse deployment. Navigate to ROOT/WEB-INF/deployment/pcd and select file com.sap.portal.navigation.masthead.par.bak. Click the download link. Open the zip file and extract it to your local file system.
      b) Open Eclipse and <u><b>create a new portal application project</b></u> based on the par file (File – Import – PAR file).
    my problem is I don't know where I can creat a new portal application?Do I need download a software?
      anyone can help me ?And give me the tool!
      thanks in advance!

    Hi,
       For NW2004s you can download from <a href="https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/cfc19866-0401-0010-35b2-dc8158247fb6">here</a>.
    The steps for installation are:
    1.Begin installation by executing JDTSetup.exe
    2.Enter installation directory where u wish to install.
    3.You will have to enter your Java SDK directory. NDS needs at least 1.4.2 version or later.
    4.Enter folder name for workspace storage: C:\NWDS\Workspace or C:\SAP\JDT\Workspace
    5.After installation is finished start Developer Studio by going to SAP Netweaver Deveoper Studio icon on your desktop.
    6.Open EP Perspective by going to Window->Open Perspective->Other->Enterprise Portal
    Hope this helps.
    Regards,
    Pooja.
    Message was edited by:
            Pooja S

  • Changing Portal Application

    Hi,
    I created an Portal Application Project in NWDS and created an component. I deployed the 
    PAR to the portal and it works fine. After that I made some changes in a java class and added some component-profile properties in the portalapp.xml. I saved and rebuilded the project, deleted the PAR in the portal. Then I deployed again and created a new iView on the basis of the deployed PAR, but the changes did not take effect. It seems like it's the old PAR file.
    What am I missing?
    Best Regards

    Hi everybody,
    I already tried deploying through portal runtime it didn't changed everything.
    Here are the steps I'm doing:
    When I change the java class and portalapp.xml I save them. Then I go to the project and choose "Build Project". So as I understand the change should take effect now. But I wonder that I can't see any compiled classes in the PORTAL-INF/classes folder.
    Do I even have to rebuild the project after mading changes or is it enough just to save them? When should the PAR update?
    Because I think that the PAR file does not update at all in NWDS.
    Regards

Maybe you are looking for