This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSF and the fly likes Embedding a JSF application iside a JSF page of another application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Embedding a JSF application iside a JSF page of another application" Watch "Embedding a JSF application iside a JSF page of another application" New topic
Author

Embedding a JSF application iside a JSF page of another application

shafaf Machingal
Greenhorn

Joined: May 10, 2012
Posts: 1
How can I call and embed one JSF application inside a JSF page of another application
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 859

Something like this:


Also, look into the ui:composition feature e.g:


WP
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

Unfortunately, the ui:include tag will only embed Facelets components, not entirely separate webapps.

Embedding a webapp in the the page view of another webapp can be a problem. The simplest "brute force" HTML way would be to use frames, but frames and JSF are not very good friends, so this can mean some struggle.

It's always good in cases like this to consider whether a Portal approach is what you really want. JSF does support working in a JSR-288 Portlet environment.


Customer surveys are for companies who didn't pay proper attention to begin with.
Matt Hardy
Greenhorn

Joined: Nov 03, 2011
Posts: 18
Is it possible to embed jsf page into html page?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

Matt Hardy wrote:Is it possible to embed jsf page into html page?


If you use frames.
Matt Hardy
Greenhorn

Joined: Nov 03, 2011
Posts: 18
But frames done work in JSF na?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

Matt Hardy wrote:But frames done work in JSF na?


They work, but it can be a problem. Frames are fetching 2 (or more) web pages at the same time and sometimes that leads to problems.

Then again, using frames at all can earn you scorn in some elitist circles.
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 859



I heap scorn on iframes!!!

I misread the question. If the OP wants to embed a completely separate app, then portal technology seems apt.

Unless a facelet component with a backing bean, invokes the app, packages up the generated HTML and presents it.
This of course leads to all sorts of css, js, image reference issues and is not a trivial task.

WP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Embedding a JSF application iside a JSF page of another application