File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes include another server's jsf file in jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "include another server Watch "include another server New topic

include another server's jsf file in jsp page

Mark Moore

Joined: Feb 21, 2006
Posts: 15
how do I include .jsf file on one server in
jsp file of another server?
[ March 09, 2006: Message edited by: Mark Moore ]
Satish Ramasamy

Joined: Feb 13, 2006
Posts: 15
You can use the JSTL import tag to include the content of a file from another server.

Thanks,<br />Satish<br /> <br />SCJP 1.4 - 98%

Joined: Jun 27, 2006
Posts: 4
I tried your approach and I could not get it work. I was using corejsf book sample code and here is the snippet.

In theory, you should be able to click a link on the menu and it will set the parameter and should be visible to the JSTL <c:import>, right? However, when this code was deployed on JBoss, I got the following display for the JSTL tag output:

The requested resource (/sampleapp/${param.chapter}.html) is not available

On the other hand, the <h utputText> can see the #{param.chapter} value. I did put the dynamic include page in a subview and f:verbatim, but nothing seems to work anyway.


<h ataTable value="#{book.chapterKeys}" var="chapterKey"
styleClass="links" columnClasses="linksColumn">
<h utputText value="#{msgs[chapterKey]}"/>
<f aram name="chapter" value="#{chapterKey}"/>
</h ataTable>

<f:subview id="sub">
<c:import url="${param.chapter}.html"/>
<h utputText value="#{param.chapter}">
</h utputText>
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Hello "CareBear"-

Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

Enjoy your time here.
I agree. Here's the link:
subject: include another server's jsf file in jsp page
jQuery in Action, 3rd edition