Skip to Content
author's profile photo Former Member
Former Member

How to Call an html page from jsp when both are in same par file

I want to open another browser by calling html page when i click an hyperlink which is displaying in my jsp page. I tried with urlgenerator to get the path of the html page which is located in pagelet using the code

urlGen = (IUrlGeneratorService) componentRequest.getService(IUrlGeneratorService.KEY);

specUrlGen = urlGen.getSpecializedUrlGenerator(IPortalUrlGenerator.KEY);

portalGen = (IPortalUrlGenerator) specUrlGen;

strUrl = portalGen.generatePortalPageUrl(componentRequest, "HtmlPage.html");

but i am getting strUrl value as null.

If i want to try with EPCM i am not able to find what value i need to pass for the doNavigate() method.

Give me solution for this.

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Aug 09, 2004 at 04:04 PM


    the problem is that portalGen.generatePortalPageUrl() generates URLs for <i>portal</i> pages, not HTML pages in general.

    In your case I'd use the following line:<pre>strUrl = request.getWebResourcePath() + "/html/HtmlPage.html"</pre>Now you only have to put your HTML file(s) into a folder "/html" underneath the "/dist" folder in your PAR (right next to "/scripts", "/images", and "/css").

    One other thing is that "EPCM.doNavigate()" only takes portal URLs (starting with "ROLES://") as a first parameter. It doesn't work with "http://" or alike. Instead I'd use the following Javascript code:<pre>'<%=strUrl%>','','');</pre>Regards


    Add comment
    10|10000 characters needed characters exceeded