cancel
Showing results for 
Search instead for 
Did you mean: 

problems using a static class extending JSPDynPage

Former Member
0 Kudos

When I use the pdk with netweaver for creating a new portal object and I want to create a new PortalComponent (JSPDynpage) the pdk generates me the next code:

public class TestJspDynPage extends PageProcessorComponent {

public DynPage getPage(){

return new TestJspDynPageDynPage(); }

public <b>static</b> class TestJspDynPageDynPage extends JSPDynPage{

public void doInitialization(){ }

public void doProcessAfterInput() throws PageException {}

public void doProcessBeforeOutput() throws PageException {}

}

}

Is there any reason for creating the new class that extends JSPDynPage static ?

Regards.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I'm having a problem with a JSPDynPage and I thougth that it was caused by the static declaration of the class but it's not the reason.

I've developed a new page that is used in an autentication scheme. It works fine except when some users acess concurrently to the JSPDynPage, in this case the aplication is crossing the sesions so one user takes values of other user.

Do you know a posible reason ?

Thanks a lot.

praveenkumar_gudapati
Active Contributor
0 Kudos

Hi,

That is a common problem, all variables in your JSPDynPage, should be saved in IPortalComponentSession/HttpSession instead of having instance/class variables.

http://help.sap.com/saphelp_nw70/helpdata/en/fc/f28f414141a709e10000000a155106/frameset.htm

http://help.sap.com/saphelp_nw70/helpdata/en/a0/3b7f41009d020de10000000a1550b0/frameset.htm

Greetings,

Praveen Gudapati

Former Member
0 Kudos

Hi Fernando,

May be the problem with your static variables whatever you have declared in your portal component or jsp, so just check it. I think you know well about "static" variables. All static values are exist in application scope. So just check it and try to conver it in to local variable.

-


hope this will helpful for you----


thanks & regards

Pankaj

praveenkumar_gudapati
Active Contributor
0 Kudos

Hi,

It is ofcourse not required to have the innerclass as static, it is only required when other classes want to reference it from outside.

Check this for Nested top level classes:

http://www.javaworld.com/javaworld/javaqa/1999-08/01-qa-static2.html?page=1

Greetings,

Praveen Gudapati