Skip to Content
author's profile photo
Former Member

How to call one JSP from another JSP

Hi,

I am trying to popup a jsp from another JSP.

When I use the url(to pop)componentRequest.getPrivateResourcePath()+"/pagelet/newPage.jsp"; I get Page cannot be dispayed error , You are not authorized to view this page.

Any ideas??

Any help is highly appreciated.

Thanks

Markandeya

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • author's profile photo
    Former Member
    Mar 26, 2004 at 09:49 AM

    Hi,

    if i use IResource to get the URL of the page , then also i am getting same error.

    I need to call a popup jsp page onClientClick event of the button.

    Any ideas??

    Any help is highly appreciated.

    Thanks

    Markandeya

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Mar 26, 2004 at 09:52 AM

    Hi,

    if i use IResource to get the URL of the page , then also i am getting same error.

    I need to call a popup jsp page onClientClick event of the button.

    Any ideas??

    Any help is highly appreciated.

    Thanks

    Markandeya

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Call the jsp using a property file.Following code will help..

      IResource jspResource=componentRequest.getResource(IResource.JSP, "pagelet/File.jsp");

      String strComponentName=jspResource.getResourceInformation().getComponent();

      strUrl = componentRequest.createPageURL(strComponentName + ".PropertyFile");

      In the property file put ComponentType as jspNativie and the name of the jsp file name.

      Then open strUrl from the javascript.

      Vivek

  • author's profile photo
    Former Member
    Mar 26, 2004 at 11:40 AM

    Thank u very much Vivek,

    Pl let me have exact code in property file.

    ComponentType=jspNative

    jspName=custSearch.jsp

    Thanks

    Markandeya

    Add comment
    10|10000 characters needed characters exceeded