cancel
Showing results for 
Search instead for 
Did you mean: 

JspDynpage dont execute

Former Member
0 Kudos
66

Hi

I'm developing a JspDynpage, when I deploy to portal and preview it, the JSP is show, but I found the JSPDynPage class are not executed, just redirecte to the jsp file. What's the problem?

public class ServerState extends PageProcessorComponent {

public DynPage getPage(){

NaiveLogger.log("ServerState.getPage()");

return new ServerStateDynPage();

}

public static class ServerStateDynPage extends JSPDynPage{

public ServerStateDynPage() {

NaiveLogger.log("ServerStateDynPage()");

}

public void doInitialization(){

NaiveLogger.log("ServerStateDynPage.doInitialization()");

}

public void doProcessAfterInput() throws PageException {

NaiveLogger.log("ServerStateDynPage.doProcessAfterInput()");

}

public void doProcessBeforeOutput() throws PageException {

NaiveLogger.log("ServerStateDynPage.doProcessBeforeOutput()");

this.setJspName("dddddddd.jsp");//does't matter

System.exit(0);//doesn't matter

}

public void startup(Event e) {

NaiveLogger.log("ServerStateDynPage.startup(event)");

}

}

}

<?xml version="1.0" encoding="utf-8"?>

<application name="com.dimension.s2s2">

<application-config>

<property name="PrivateSharingReference" value="htmlb"/>

</application-config>

<components>

<component name="ServerState">

<component-config>

<property name="ClassName" value="com.dimension.s2s.ep.ServerState"/>

<property name="ComponentType" value="jspnative"/>

<property name="JSP" value="pagelet/serverstate.jsp"/>

<property name="SafetyLevel" value="low_safety"/>

</component-config>

<component-profile>

<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>

</component-profile>

</component>

<component name="StartS2S">

<component-config>

<property name="ClassName" value="com.dimension.s2s.ep.StartS2S"/>

<property name="ComponentType" value="jspnative"/>

<property name="JSP" value="pagelet/startup.jsp"/>

</component-config>

<component-profile/>

</component>

<component name="Shutdown">

<component-config>

<property name="ClassName" value="com.dimension.s2s.ep.Shutdown"/>

<property name="ComponentType" value="jspnative"/>

<property name="JSP" value="pagelet/shutdown.jsp"/>

</component-config>

<component-profile/>

</component>

</components>

<services/>

</application>

Thank you very much!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

change your portalapp.xml file to the following code and try.

<?xml version="1.0" encoding="utf-8"?>

<application name="com.dimension.s2s2">

<application-config>

<property name="SharingReference" value="htmlb"/>

</application-config>

<components>

<component name="ServerState">

<component-config>

<property name="ClassName" value="com.dimension.s2s.ep.ServerState"/>

<property name="SafetyLevel" value="low_safety"/>

</component-config>

<component-profile>

<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>

</component-profile>

</component>

<component name="StartS2S">

<component-config>

<property name="ClassName" value="com.dimension.s2s.ep.StartS2S"/>

</component-config>

<component-profile>

<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>

</component-profile>

</component>

<component name="Shutdown">

<component-config>

<property name="ClassName" value="com.dimension.s2s.ep.Shutdown"/>

</component-config>

<component-profile>

<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>

</component-profile>

</component>

</components>

<services/>

</application>

hope this helps.

regards

Yoga

Former Member
0 Kudos

Thank you Yoga, problem solved!

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

The JspDynpage is a controller which calls the JSP page. if you place a component in the JSP page and write the function for the components event in the JspDynpage then that function in the JspDynpage will be executed when the event occurs.

If you donot have any events then the JspDynpage just calls the JSP page.