Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

include another server's jsf file in jsp page

 
Mark Moore
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the JSTL import tag to include the content of a file from another server.

 
CareBear
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks

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

<f:subview id="sub">
<f:verbatim>
<c:import url="${param.chapter}.html"/>
<br/>
<h utputText value="#{param.chapter}">
</h utputText>
</f:verbatim>
</f:subview>
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic