Java JSP and Servlet with Jakarta EE and Hibernate
Java JSP and Servlet with Jakarta EE and Hibernate is a workshop course in building web applications with servlets and JSP on Jakarta EE 11 alongside Hibernate ORM 7, from MVC, sessions and security to database mapping and deployment. It suits aspiring Java developers, students working on projects and developers who maintain older Java systems.
- Duration24 hours · 4 days
- FormatOnsite / live online
- Next roundOn request
- CertificateIncluded
Course overview
Many organisational Java web systems still run on servlets and JSP with Hibernate, and IT teams need to maintain or modernise them. Since Jakarta EE 9, every javax package has become jakarta, and current Hibernate uses annotations with Jakarta Persistence instead of the old XML mapping files. Older examples and textbooks therefore do not work directly with current Tomcat and Hibernate, and new developers often do not understand how the layers of a web application fit together.
This new edition is updated for Java 25 LTS, Jakarta EE 11, Apache Tomcat 11 and Hibernate ORM 7, with workshops throughout. Learners build MVC web applications with servlets as controllers and JSP with EL and JSTL as views, connect to databases with JDBC and a connection pool, and handle filters, sessions and security. They then move the data layer to Hibernate with mapping, HQL, transactions and Jakarta Data repositories, exchange data with Ajax and JSON, and build a WAR for deployment on Tomcat or Docker. (4 days, 6 hours per day, 24 hours in total, Intermediate level.)
What you’ll gain
- Understand Java web architecture with MVC and the move from javax to jakarta
- Build controllers with Jakarta Servlet and views with JSP, EL and JSTL
- Connect to databases safely with JDBC and a connection pool
- Use filters, sessions and web container security to build a login system
- Map classes to tables with Hibernate ORM 7 annotations and handle relationships
- Query with HQL and Criteria, manage transactions and use Jakarta Data repositories
- Exchange data with Ajax using the Fetch API and JSON
- Build a web application as a WAR and deploy it to Tomcat or Docker
Who this course is for
- People who want to become Java web developers
- Students building Java web application projects
- Developers and administrators who maintain or migrate older Servlet, JSP and Hibernate systems
- Developers who want solid foundations before moving to frameworks such as Spring Boot
Prerequisites
- Java programming basics such as classes, collections and exceptions, or completion of Basic Java Programming
- Basic HTML and SQL
- No previous Servlet, JSP or Hibernate experience is needed
- A laptop that can install software and Docker Desktop
Curriculum
Course Details
This course is a 2026 edition that replaces the previous Java JSP & Servlet with Hibernate Framework course. It has been rewritten for Java 25 LTS, Jakarta EE 11, Apache Tomcat 11 and Hibernate ORM 7. It runs for 4 days, 6 hours per day (24 hours in total, 09:00-16:00), as lectures alternating with labs and workshops throughout. Intermediate level, building on Basic Java Programming. Learners build MVC web applications with servlets and JSP, connect to databases with JDBC and Hibernate, create a secure membership system, use Jakarta Data repositories, exchange data with Ajax and JSON and deploy on Tomcat or Docker. They take home a lab guide, source code and a starter project.
Day 1 Jakarta EE, Servlet and JSP
Section 1: Java Web and Jakarta EE 11 Overview
- How web applications work: HTTP requests, responses and the web container
- From Java EE to Jakarta EE, and the package change from javax to jakarta
- What Jakarta Servlet, Jakarta Pages (JSP), EL, JSTL and Jakarta Persistence each do
- How Tomcat differs from a full application server
- The MVC idea and the system built throughout the course
Section 2: Lab: Tool Setup and a First Project
- Install Java 25 LTS, Maven and IntelliJ IDEA or VS Code
- Install Apache Tomcat 11 and connect it to the IDE
- Run MySQL or PostgreSQL on Docker
- A Maven WAR project structure and Jakarta EE dependencies
- Lab: a first servlet and JSP deployed to Tomcat
Section 3: Lab: Servlets as Controllers
- Create servlets with @WebServlet and handle doGet and doPost
- Read HTML form and query string values with UTF-8 for Thai text
- forward versus redirect, and the Post/Redirect/Get pattern
- Pass data from controller to view through request attributes
- Lab: a registration form validated before saving
Section 4: Lab: JSP Views with EL and JSTL
- JSP page structure, and why to stop using scriptlets
- Expression Language to display model data
- JSTL core and formatting tags for conditions, loops, dates and numbers
- Reusable headers, footers and layouts with include and tag files
- Lab: a product list page with a full MVC controller and view
Day 2 Databases, Sessions and Security
Section 5: Lab: Models and DAOs with JDBC
- Design database tables and model classes or records
- Write DAOs with JDBC and PreparedStatement to prevent SQL injection
- Configure a connection pool through a Tomcat DataSource
- Separate the service layer from controllers
- Lab: add, search, edit and delete products through the web
Section 6: Lab: Advanced Servlets
- The servlet lifecycle: init, service and destroy
- ServletContext and listeners to prepare resources at startup
- Multi-threading in servlets and thread-safe code
- File uploads with @MultipartConfig and file type checks
- An overview of async servlets for long-running work
Section 7: Lab: Filters and Session Management
- What filters are and how to use them for encoding, logging and access checks
- HttpSession, cookies and session lifetime
- Build login and logout with sessions and invalidate
- Use a filter to require login before protected pages
- Lab: a membership system with an admin area
Section 8: Lab: Web Application Security
- Web container security: FORM authentication and roles
- Store passwords as secure hashes, never as plain text
- Prevent XSS by escaping in JSP and CSRF with tokens
- HttpOnly and Secure cookies, and HTTPS
- Lab: find and fix vulnerabilities in a sample app
Day 3 Hibernate ORM 7
Section 9: Lab: Getting Started with Hibernate ORM 7
- What ORM is, how it reduces JDBC work, and its pitfalls
- Hibernate ORM 7 with Jakarta Persistence 3.2, and what changed from older Hibernate
- Declare entities with annotations instead of hbm.xml files
- Configure with persistence.xml or HibernatePersistenceConfiguration
- Create one EntityManagerFactory per app with a listener and let Hibernate create tables
Section 10: Lab: Mapping Tables and Relationships
- Primary keys and generated values
- Mapping enums, dates and embeddables
- ManyToOne, OneToMany and ManyToMany relationships
- Lazy and eager loading, and recommended defaults
- Lab: map products, categories, customers and orders
Section 11: Lab: Querying with HQL and Criteria
- HQL for class-based queries with parameters
- The Criteria API and the static metamodel from Hibernate Processor
- Pagination and ordering
- The N+1 problem and fixing it with join fetch
- Lab: a multi-filter product search page with pagination
Section 12: Lab: Transactions and Validation
- Manage transactions with runInTransaction and inTransaction
- Build a service layer that uses Hibernate correctly in a web app
- Validate data with Jakarta Validation and Hibernate Validator
- Optimistic locking with @Version when users edit at the same time
- Lab: save an order and its items in a single transaction
Section 13: Lab: Jakarta Data Repositories
- What Jakarta Data is, and Hibernate Data Repositories
- Declare repositories with @Repository, @Find, @Insert and @Query
- Queries checked at compile time by Hibernate Processor
- Compare classic DAOs, the new repositories and Spring Data
- Lab: convert the product DAO into a repository
Day 4 Workshop, Ajax and Deployment
Section 14: Workshop: A Master Data Management System
- Design a product, category and customer system with MVC
- Servlets as controllers, JSP as views and Hibernate as the data layer
- Add and edit forms with validation and feedback messages
- Workshop: complete full CRUD with user permissions
Section 15: Lab: Ajax with the Fetch API and JSON
- Servlets that return JSON with Jackson
- Call them from JSP pages with the Fetch API and async/await
- Search-as-you-type and pagination without reloading the page
- Post JSON back for saving with a CSRF token
- Lab: a product table you can search and edit without reloading
Section 16: Lab: Build and Deployment
- Build a WAR with Maven and separate settings per environment
- Deploy to Tomcat and configure logging
- Run the app and database with Docker Compose
- Migrate older javax projects to jakarta with migration tools
- Lab: deploy the system you built in a container
Section 17: Workshop: A Real-World Capstone
- Choose a brief such as stock control or meeting room booking
- Combine servlets, JSP, Hibernate, sessions, security and Ajax
- Test, fix bugs and deploy on Docker
- Present your work and plan next steps towards Jakarta REST and Spring Boot
Schedule & training options
For individuals — public rounds
No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770
For organisations — in-house / private
- Tailor the content to your team’s tools and projects
- Your dates, at your office or live online
- Quotation with tax ID for procurement
Instructors
Frequently asked questions
How do servlets and JSP differ, and how do they work together in MVC?
A servlet is a Java class that receives an HTTP request and sends a response, suited to logic and controlling flow. JSP, now Jakarta Pages, is an HTML page that displays data with EL and JSTL tags, suited to presentation. In MVC the servlet acts as the controller, calling services and repositories as the model to fetch data, then forwards to a JSP view through RequestDispatcher. In current Jakarta EE all of these live in jakarta packages instead of javax.
What is Hibernate, and how does the current version differ from older ones?
Hibernate is an ORM framework that maps Java classes to database tables, so you can save, update and load data as objects without writing repetitive JDBC and SQL. Hibernate ORM 7 uses annotations with Jakarta Persistence 3.2 instead of the old XML mapping files, offers HQL and Criteria for queries, manages transactions and supports Jakarta Data repositories whose queries are checked at compile time, so code is shorter and errors surface sooner.
How do you build a session-based login in a Java web application?
Create a login form that posts to a servlet. The servlet looks up the user in the database and checks the password against the stored hash. If it matches, call request.getSession(), change the session ID, store the user with setAttribute and redirect to the home page. Use a filter to check the session for a user before protected pages, set cookies as HttpOnly and Secure, and call session.invalidate() on logout.
How can an existing javax-based system move to Jakarta EE?
Since Jakarta EE 9, packages such as javax.servlet and javax.persistence have become jakarta, so older systems do not run on Tomcat 10 or later as they are. The main steps are switching Maven dependencies to Jakarta versions, changing imports, updating JSTL URIs and web.xml, and upgrading Hibernate while moving XML mappings to annotations. Migration tools can convert the packages automatically, but every part of the system should be tested before going live. This course includes a topic on this approach.
Who is the Java JSP and Servlet with Jakarta EE and Hibernate course for, and what should I know beforehand?
It suits people who want to become Java web developers, students building Java web application projects, and developers or administrators who maintain or migrate older Servlet, JSP and Hibernate systems. You need Java basics such as classes, collections and exceptions, or completion of Basic Java Programming, plus basic HTML and SQL.
What will I be able to do after the Java JSP and Servlet with Jakarta EE and Hibernate course?
You will be able to build MVC Java web applications on Jakarta EE 11 with servlets as controllers and JSP with EL and JSTL as views, connect to databases through JDBC and a connection pool, handle sessions and security with filters, map tables with Hibernate ORM 7, query with HQL and Criteria, manage transactions, use Jakarta Data repositories, exchange data with Ajax and JSON and deploy on Tomcat or Docker. Participants who complete the training receive a Certificate of Completion with its own number, which can be verified online.
Related articles
Articles are published in Thai.

