Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8445843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:45:56+00:00 2026-06-10T09:45:56+00:00

I am a newbie to Hibernate. I have a school project using MySQL, JDBC,

  • 0

I am a newbie to Hibernate.

I have a school project using MySQL, JDBC, JSP/Servlet, Tomcat technologies.

The way that I do the database connection in EVERY Servlet is:

  1. establish database connection in JDBC.
  2. create Query statement and execute it.
  3. close database connection.

That is very very tedious, so I want to use JPA with Hibernate to handle it.

I looked some tutorials and saw that there’s a JPA Project option in Eclipse, so went ahead and used it.

Now I am confused about how to add JSP/Servlet into this project. It seems like this type project is not meant for handling any front-end technologies.

Could anyone please help me clear this out? What type of eclipse project should I use in my case?

Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:45:58+00:00Added an answer on June 10, 2026 at 9:45 am

    You can use whatever Eclipse project templates you want, they just setup directory structure and libraries for convenience. You could start with a normal Java project if you wanted, it’s just a matter of understanding what libraries/dependencies to setup. My personal preference is to use the Dynamic Web Project so it set’s up my web directory structure and web.xml.

    Adding JPA/Hibernate to a project consists of:

    1) Mapping your classes (annotations or xml)
    2) Creating the EntityManagerFactory/SessionFactory
    3) Inject the Factory where you need database access

    If this is your first non-trivial database application take a look at the DAO Pattern. It will help you understand how to abstract away database specific decisions (e.g. JDBC vs Hibernate vs JPA) from your application logic.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am newbie for hibernate,i am using mysql database,with two tables serviceTypeDetails,validateConfig.In serviceTypeDetails,it's having
I am a newbie in hibernate, I am using @javax.persistence.NamedNativeQuery to resolve my stored
Imagine the following (simplified) database layout: We have many holiday records that relate to
I'm using JPA/Hibernate (a newbie at them). When an exception occur (could be an
I started using Hibernate recently and I'm still a newbie, however, the error I'm
I'm a java newbie, want to test out some hibernate goodies! I have netbeans
I am a newbie with Fluent NHibernate and have got a question that may
I'm a newbie in Database design and in Hibernate too. I started reading the
I am using Hibernate 3 and MySQL5.5. I am a newbie to hibernate and
I'm a newbie to Hibernate. I have an Item POJO which contains a Set<String>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.