File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes JSP and Facelets integration? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "JSP and Facelets integration?" Watch "JSP and Facelets integration?" New topic
Author

JSP and Facelets integration?

Aoife Kavanagh
Greenhorn

Joined: Feb 28, 2005
Posts: 16
Hi,

The UI of our product consists of an in-house widget framework developed using JSPs. We're currently looking at JSF so that we're more standards based. However, the current framework is large and there is no way that we can just scrap it and do a complete rewrite in JSF. We need to integrate new pages/components in to the existing product in as seamless a manner as possible.

After doing much looking around it seems that Facelets is rated fairly highly by JSF users out there. Obviously though this would make any sort of integration with existing framework (remember it's JSP based) more difficult. Basically, I'm wondering has anybody else experienced this problem and if so how did they deal with it?
Were they able to use facelets for new technologies and integrate successfully with old JSP pages?
I know that it's not possible to mix JSP and Facelet tags on the same page. But is it even possible to have an xhtml page include (using ui:include) a JSP page? I can't get a simple example to work myself but unsure if that's just lack of know-how rather than it not being technically possible. Can anybody confirm?
Would/could there be any lifecycle issues?
Also if it turned out that it might be technically possible to work with facelets and JSPs altogether are there any *have to* requirements? For example are there limitations on JSF, JSP, Facelet versions? Or maybe something else?

I appreciate that this is possibly not a simple yes/no post (though might be simpler if it is!) but I reckoned there was no harm in trying to draw on the experience of anybody else who might have had to face this problem too.

Thanks,
Aoife
Majid Al-Fifi
Ranch Hand

Joined: Aug 22, 2006
Posts: 45
I am also searching to see if we still need Facelets with the new JSF1.2 and JSP2.1 because they relation between JSF and JSP is much better than ever. If someone has an opinion on this please share it.

I have found the following useful:

http://wiki.jboss.org/wiki/Wiki.jsp?page=JSP2_1_vs_Facelets

regards,

Majid


SCJP1.4, SCWCD1.4
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 12513

JSF, Struts, and simple JSPs are all capable of living amicably together in a single webapp. You don't have to do a massive overnight conversion - instead to can migrate a little bit at a time.

Facelets was intended to provide some additional support to the JSF environment, and I'm not actually sure how well it works on non-JSF web pages, but it won't cause any problems if you do straight JSP on some pages and Facelets/JSF on others and even JSF without Facelets on some.


One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
 
 
subject: JSP and Facelets integration?
 
Threads others viewed
Navigation to Calling Page
Pass value to ManagedBean in Facelet
How does SEAM compare with facelets ?
Spring MVC 3 and JSF2 Integration
categorize data display
MyEclipse, The Clear Choice