Skip to Content

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

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2005 at 01:46 PM

    Hi Narahari,

    Try changing your <i>a href</i> tag as follows:

    <b><a href="<%=helpUrl %>">click here</a></b>

    This might work for you.

    Ranjith

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2005 at 04:55 AM

    Hi,

    IF you are using EPCF.doNavigate then you should give the iview address as the url. If should be something like this

    <%

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

    String helpUrl = "ROLES://portal_content/administrator/super_admin/super_admin_role/com.sap.portal.system_administration/com.sap.portal.system_admin_ws/com.sap.portal.support/com.sap.portal.support_desk";

    %>

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

    Or as Ranjith said use the href option

    Regards

    Prakash

    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.