Skip to Content
0
Oct 18, 2005 at 12:37 PM

Calling JSP files existing in the pagelet/jsp folder of the PAR file

51 Views

Hi,

I have all my JSPs in the Pagelet/JSP folder and am trying to call one from other.

For example :- There are 2 JSPs, namely, FILE1.jsp and FILE2.jsp. Now when I try to display the first and call the second on clickling a hyper link in the first page dispalyed, i am facing issues.

I have included a component entry for both the files. Here's the extract :-

<components>

<component name="File1">

<component-config>

<property name="ClassName" value="com.bp.ngl.gen.File1"/>

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

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

</component-config>

</component>

<component name="File2">

<component-config>

<property name="ClassName" value="com.bp.ngl.gen.File2"/>

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

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

</component-config>

</component>

<component-profile/>

And i have inlcuded the following code in the first JSP file to call the second JSP file :-

<%

String componentName = componentRequest.getComponentContext().getApplicationName();

String helpUrl = "/irj/servlet/prt/portal/prtroot/"componentName".File2";

%>

<a href="tools" onClick = "return EPCM.doNavigate("<%=helpUrl %>");">click here</a>

But this gives me a Portal runtime error.

I tried creating seperate IViews for both of these JSPs?? I am not sure whether it is required to have it that way. Also I am not sure as if we need seperate java files for each of the JSPs that we create.

Please help me in this.

Thanks.

Regards,

Narahari