permaculture playing cards*
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
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "JPA 2 and Servlets/JSP" Watch "JPA 2 and Servlets/JSP" New topic
Author

JPA 2 and Servlets/JSP

Rogerio Kioshi
Ranch Hand

Joined: Apr 12, 2005
Posts: 689
Hi,

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

If not, why?

Thank you.

SCEA 5 (part 1), SCBCD, SCWCD, SCJP, CLP, CLS
Mike Keith
author
Ranch Hand

Joined: Jul 14, 2005
Posts: 304
Rogerio,

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,


-Mike
Pro JPA 2: Mastering the Java Persistence API
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JPA 2 and Servlets/JSP
 
Similar Threads
About Http POST
suggess a book or link for servlet.
API to get Browser from UserAgent string
Favourite "Head First" girl?
Mail Alerts on birthdays