Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Embedding a JSF application iside a JSF page of another application

 
shafaf Machingal
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I call and embed one JSF application inside a JSF page of another application
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something like this:


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


WP
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17989
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Matt Hardy
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to embed jsf page into html page?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17989
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Matt Hardy wrote:Is it possible to embed jsf page into html page?


If you use frames.
 
Matt Hardy
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But frames done work in JSF na?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17989
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic