This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes JPA 2 and Servlets/JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "JPA 2 and Servlets/JSP" Watch "JPA 2 and Servlets/JSP" New topic

JPA 2 and Servlets/JSP

Rogerio Kioshi
Ranch Hand

Joined: Apr 12, 2005
Posts: 690

Would you use JPA2 with Servlets/JSP instead of JSF?

If not, why?

Thank you.

Mike Keith
Ranch Hand

Joined: Jul 14, 2005
Posts: 304

That is not really a question relating to persistence so much as presentation technology. Both servlets and JSF are integrated with JPA, so you can use either one. If you use JSF in a Java EE 6 container like Glassfish, though, then you could use the new Contexual Dependency Injection spec to share managed beans across JSF and the component layer, which makes things easier to code.

Hope this helps,

Pro JPA 2: Mastering the Java Persistence API
I agree. Here's the link:
subject: JPA 2 and Servlets/JSP
jQuery in Action, 3rd edition