File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet + Hibernate

 
Kunal Lakhani
Ranch Hand
Posts: 622
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can servlets be integrated with Hibernate?
 
Tim Moores
Bartender
Pie
Posts: 2496
9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what you mean by "integrate", but Hibernate is frequently used in Java web apps. Being DB-related it should generally be in a layer that's separate from the web layer (i.e., the servlet), so the class extending HttpServlet would not normally have Hibernate code in it.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply. I mean that can it be used in DAO classes?
I have a pojo class, a servlet class, and a DAO(containing db related stuff) class.
 
Tim Moores
Bartender
Pie
Posts: 2496
9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use it wherever you want to. I was merely pointing out that DB code and servlet code should be separated.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for you reply Tim. I will try and will post here if i face any difficulty.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic