Skip to Content
author's profile photo Former Member
Former Member

Multiple JSPs in JSPDynPro Project using Netweaver Development Studio

I have a project that I want to have two JSPs in. The first jsp you see before you input data, and the second you see after you input the data. What is the proper procedure for adding a second jsp to your project in NetWeaver Developer Studio? I tried File -> New -> Other -> Simple -> File then calling it myJSPFile.jsp and it adds it but I don't know how to then configure the portalapp.xml file to also include this JSP along with the other one. So basically, when I run my iView I get the first page and on my event it just goes back to the first page. So I think I am not configuring my portalapp.xml file properly. I am placing the JSP in the /dist/PORTAL-INF/pagelet folder along with the other one.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2005 at 03:42 AM

    Hi Eric,

    What you can do is create a static int variable.

    private static int State;

    public void doInitialization() {

    State = 0;

    }

    In the event in the first jsp set the value to 1

    and in the second screen event assign it back to 0.

    public void doProcessBeforeOutput() throws PageException {

    if (State == 0) {

    this.setJspName("First.jsp");

    }

    if (State == 1) {

    this.setJspName("Second.jsp");

    }

    }

    Hope this helps

    Regards

    Prakash

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2005 at 06:18 AM

    Hi Eric,

    JspDynpage follows the MVC architecture so the JSP can be swapped as u wish. So what u have to do is to set some conditions for displaying the JSP in the controller.

    When creating a JSPDynpage project we will get one JSP file and one Java file. U can create another JSP and place in the pagelet folder in the project.

    In the java file(controller), u have to write the conditon and set the file to be displayed as mentioned by Prakash. like this.setJspName("myJSP.jsp");

    Regards

    gEorgE

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.