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

Accessing a jsp page from jspDynPage

Hi All

I've got a problem I'll hope someone could give me some input about.

I've created a jspDynPage in a portal application. In the setJspName() method I would like to reach another jsp page that are deployed to a separate web application in the portal. I've tried with a URL like:

this.setJspName("http://localhost:50000/[<i>webapp</i>]/test.jsp");

But the page can't be found. When I put the URL in the address field of a browser window, the jsp is found and displayed.

In my next step I'll reach a HTML-page in the KM from the separate web application, but this gives me problems to.

I have some thoughts about security settings, but I'm not sure about how it really works with a separate web application and portal applications.

Any help would be appreciated and thanks in advance.

Best regards

Mikael Lofberg

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 05, 2006 at 07:19 AM

    Hi Mikael,

    Generally, another jsp can be accessed using its component name as project_name/component_name. I think setJspName can access the jsp(s) only inside that project. The problem with

    this.setJspName("http://localhost:50000/[webapp]/test.jsp"); is that it looks for a jsp name "http://localhost:50000/[webapp]/test.jsp" inside pagelet folder(name as such). So this will not work. So you can either open a new window for the new jsp from your project or make a copy of that jsp in your project.

    Regards

    Harini S

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 05, 2006 at 07:54 AM

    Mikael,

    you can only use JSPs that are part of your own project. Simply enter the JSP's name, e.g.:

    this.setJspName("mypage.jsp");
    

    If the page resides in a sub folder of your project, include the folder's name, too:

    this.setJspName("pagelet/mypage.jsp");
    

    Note that the Java code inside your JSP will run on your system.

    If you want to access a remote web site (be it JSP or whatever), you might consider using the IsolatedHtmlContainer or NonIsolatedHtmlContainer controls (hbj-tags) instead. Or, simply go for a link/redirect whatever.

    Kind regards,

    Dominik Witte

    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.