jQuery in Action, 3rd edition
The moose likes JSF and the fly likes JSF + EJB (Need to define templates) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF + EJB (Need to define templates)" Watch "JSF + EJB (Need to define templates)" New topic

JSF + EJB (Need to define templates)

Irfan Kapadiya

Joined: Jan 28, 2011
Posts: 3
Hi All,
My project architecture is a combination of JSF and EJB and I need to use templates.

I integrated facelets into JSF and also tried using Tiles with JSF for templating. Both worked fine but I would like to know which one is a better solution.
Please suggest.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

Welcome to the Javaranch, Irfan!

Facelets is the preferred technology for tiling these days. My own experiences with Tiles have been very frustrating, but Facelets has always worked well for me.

JSF works well with EJB, but there is one restriction: you should avoid using EJBs as JSF backing beans. Not because you can't, but because the ways you can work with a "permanent' EJB are pretty limited, and the JSF backing beans are "permanent" in the sense that you can't swap one copy of a bean for another. So it's better to use a POJO as a facade for the actual EJB.

An IDE is no substitute for an Intelligent Developer.
Cesar Loachamin
Ranch Hand

Joined: Dec 25, 2010
Posts: 90

Hi Irfan.

I agree with Tim. Facelets is a great technology for View Handler, and this is so that it became the deafult View Descriptor Language for JSF 2.0 and it's totally integrated with JSF 2.0 and the most new future in the JSF 2.0 specification (as composite components) is due the integrated use of Facelets , so I suggest you use Facelets, it's works very well .

When a dream is ending because to come true - OCPJP 6,7. OCE JPA EE6. MCTS
Irfan Kapadiya

Joined: Jan 28, 2011
Posts: 3
Hi All,

Thank you very much for your help/inputs.

I am using JSF1.2 in my project.

Can you please help in letting me know what are advantages/disadvantages of using Tiles2.0/Facelets.

I appreciate your valuable inputs.

Thanks in advance.

I agree. Here's the link: http://aspose.com/file-tools
subject: JSF + EJB (Need to define templates)
jQuery in Action, 3rd edition