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

2 JSPDyn Pages

Hi @ all!

I'm trying to create a small portal application consisting of more than one JSPDyn Page.

At the moment I have:

- 2 JSPDynPages

- 2 .jsp files

- 1 Bean for communication

Under certain conditions (successful login) I want to call another (second) JSPDynPage. But I don't know how...

with:

this.setJspName("CFR_logon.jsp");

I get to the next .jsp file. But this file wants to use

EventHandlerMethods of the first JSPDynPage. It does not

search the method in the second JSPDynPage...

Thank you! Regards, Christian

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2004 at 02:22 PM

    Hi,

    with this.setJspName("CFR_logon.jsp"); You just dispatch to another JSP staying on the same Dynpage. If You want to change to another Dynpage You have to call another iView (means You have to declare Your Dynpage as iView).

    Another possibility could be to call the other Dynpage from the PageProcessorComponent:

    public DynPage getPage() { // Has to be overridden

    return new DynPageOne();

    // Calls the DynPage and returns its value as DynPageOne

    }

    here You can sty on the same iView

    Walter

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Yes, You are right.

      SAP implemented a special Session, Request, Application/Context Object Model.

      If You store Your bean in a (so called) SAP component... Object. It is only valid for the actuall iView.

      So You have to store Your bean in the (normal) "J2EE" Session, Request, Application/Context Object. this can be read from all iViews.

      JSPDynPage;

      componentRequest = (IPortalComponentRequest) getRequest();

      componentSession = componentRequest.getComponentSession();

      request = componentRequest.getServletRequest();

      session = componentSession.getHttpSession();

      session.setAttribute("myBean", myBean); // Storing the Bean in the J2EE Session

      TAKE CARE!!

      If You use the J2EE Session... You can't use the JSP Taglib for getting the Bean out of the Session. You have to initialize the objects like this:

      <%

      ....

      request = componentRequest.getServletRequest();

      ...

      %>

      Try it

      Walter

  • author's profile photo Former Member
    Former Member
    Posted on Dec 07, 2004 at 02:00 PM

    Hi waltair,

    I am using jspdynpage(application scope) and stored all the values in bean.i have 3 iView page.i passed some values from iview1 ->2 -->3. if i am not doing anything for more than 5 mins in my 3rd iView page and again go back to iView page 2 i lost alost all my bean values.so i am getting null pointer exception(portal runtime error).

    if i play around continously in all 3 iViews , i didnt get any error.

    is there any reason my bean lost data?

    regds,

    Anto.

    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.