Why Facelets not JSP?
The main benefit of using Facelets over JSF is that Facelets supports code reuse through templating and composite components.
The example below shows how the address.xhtml template is used in the useraddresses.xhmtl file. A user has a mailing address and a shipping address. The address.xhtml is used twice in the useraddresses.xhtml. The big difference between Facelets template and JSP include is that you can pass object parameters from the including file to the template in Facelets and you can’t do that from JSP including file.
What is the difference between Seam Managed Persistence and EJB managed Persistence Context?
Understanding JBoss Seam Contextual Dependency Injection
WHY Contextual Dependency Injection?
How does Seam Inject work?
Seam context scope
Component life cycle management
Understanding JBoss Seam Registration example
What is JBoss Seam?
The Registration example
JBoss Seam distribution comes with many sample applications. The registration example allows users to store his username, real name and password in the database. Blow is a screen shoot from Seam Document.
The Entity bean: user.java
The Action class: RegisterAction.java
The View: Register.xhtml
The View: Registered.xhtml