on 04-05-2006 7:57 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harini
Thanks for your quick reply.
To make a copy of my jsp page in the project won't work, since the jsp page I would like to reach are using a taglib and a lib (PD4ML) to convert HTML pages to PDF. And it won't work inside the project because the J2EE UI framework takes control and opens output stream before PD4ML-enabled JSP page is loaded. PD4ML needs an exclusive control over the output stream.
Could you explain how you mean with open a new window, and how it should be done from the jspDynPage?
I've also tried to set the jsp to a page in the pagelet folder. In that jsp page I tried to do a redirect to the PD4ML-enabled JSP page in the web application. But with out any success.
What I need to do is to pass the URL for a HTML page in the KM to the jsp page in the web application. So that the PD4ML could convert it to a PDF. The HTML page is an article created in the portal by some publisher, which is converted to HTML when a user selects "view/save as PDF" from the context menu of the article. The PD4ML-enabled JSP page in the web application then needs to be able to access the HTML page in the KM to do the conversion. The users should then have the possibilities to save this PDF file.
Regards
Mikael Lofberg
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.