O'Reilly logo

Java EE 6 with GlassFish 3 Application Server by David R. Heffelfinger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Integrating JSF and JPA

So far we have covered many of the features of JSF. However, our example application does not actually save any data yet. In this section, we will cover how JavaServer Faces and the Java Persistence API can be easily integrated to save user input to a database.

We will also cover additional JSF and JPA features. Regarding JSF, we will cover how to perform some logic in the server before navigating to another page, and how to automatically populate a managed bean's property through the @ManagedProperty annotation. As far as JPA, we will cover how to automatically generate primary keys.

Like we have seen in this chapter, JSF managed beans are nothing but standard JavaBeans. In Chapter 5, we saw that JPA uses standard JavaBeans ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required