cancel
Showing results for 
Search instead for 
Did you mean: 

JSP request/response objects

Former Member
0 Kudos

Hi,

I am fairly new to NW development. I've developed a new JSPDynpage.

I've exported a Par file and deployed it into my portal and created an iView by using "New from Par".

The JSP associated with the JSPDynPage is just a form that takes in data. Upon clicking the submit button, I want to be taken to a subsequent JSP for processing.

In my <form ...> tag, I have "changePassword.jsp". When I click the button, I get an error, saying changePassword.jsp not found.

My question is, can't I use the classical way of manipulating request/response objects via multiple JSPs, or do I have to use IPortalComponentRequest in one portal component.

Thanks.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Praveen,

Thanks agian for you response. I have a small test case which is not working. Please refer to this thread:

I have 2 JSPs in my pagelet folder and am never redirected to the 2nd one. This is very strange.

Thanks!

-Vu

Former Member
0 Kudos

One more question. As far as the second response JSP is concerned, does that need to have an associated DynPage with it? Or can it be any JSP located in the /pagelet folder?

-Vu

Former Member
0 Kudos

Hi Praveen,

Thanks for the response. I followed the example from the PDK and also did it your way. Nothing happens when I click the button. Do I have to use HTMLB button to get my request/response objects populated correctly?

-Vu

Former Member
0 Kudos

Hi Vu,

Its better to use Htmlb button. I have given example for the htmlb button in your earlier post. As well you dont have to create a new dyn page for another. Just create a new jsp page.

Thanks,

Praveen

Former Member
0 Kudos

Hi,

If you r using JSPDynPage and using HTMLB button, u can pass onClick event. Then when u click on button, the control comes back to

public void doProcessAfterInput() method. There you can set flag and call ur a new Jsp page. Let me give u an example.

public void doProcessBeforeOutput() throws PageException {

switch (state) {

case ChangePass_State :

this.setJspName("ChangePassword.jsp");

break;

default :

this.setJspName("Init.jsp");

break;

}

}

public void onChangePasswdButtonClicked(Event event) throws PageException {

state = ChangePass_State ;

}

this is easy and simple as control will be in ur scope.

See examples in SAP EP Java Development, you will find many solutions.

Hope this Helps.

Thanks,

Praveen