Java

Developing Java EE Web Applications, plus JDBC/JPA and REST (JEE101)

Course Length: 5 days

This course provides a comprehensive guide to developing Java EE web applications with a focus on JavaServer Pages (JSP), Servlets, and data persistence using JDBC and JPA.

Developing Java EE Web Applications, plus JDBC/JPA and REST

Register or Request Training

  • Private class for your team
  • Live expert instructor
  • Online or on‑location
  • Customizable agenda
  • Proposal turnaround within 1–2 business days

Course Overview

This course provides a comprehensive guide to developing Java EE web applications with a focus on JavaServer Pages (JSP), Servlets, and data persistence using JDBC and JPA. It is designed for Java developers who want to build robust, scalable web applications that integrate seamlessly with databases, covering everything from the basics of web development to advanced topics like session management and transaction handling.

The course begins with an Introduction to Java EE, where you'll learn about the Java Enterprise Edition platform and its key components, including Servlets, JSP, and Enterprise JavaBeans (EJB). You'll explore the role of Java EE in enterprise application development and how it simplifies building large-scale, distributed applications.

In the Working with Servlets module, you'll dive into the fundamentals of Java Servlets, which handle requests and responses in a Java web application. You'll learn to create, configure, and deploy Servlets, manage request parameters, and handle HTTP methods like GET and POST. Practical exercises will guide you through building dynamic content, managing cookies, and understanding session tracking.

The JSP Development section focuses on JavaServer Pages, which allow you to create dynamic web content using HTML, CSS, and Java code. You'll learn how to use JSP tags, expressions, and directives to build interactive web pages. This module also covers JSP lifecycle, error handling, and integrating Servlets and JSPs for effective web application development.

The JDBC module teaches you how to connect Java applications to relational databases using Java Database Connectivity (JDBC). You'll explore the basics of JDBC API, including establishing connections, executing SQL queries, and managing result sets. You'll also learn best practices for handling exceptions and ensuring data integrity through transaction management.

In Advanced JDBC Features, you'll delve into topics such as using PreparedStatements for parameterized queries, CallableStatements for stored procedures, and batch processing for executing multiple queries efficiently. You'll also learn about connection pooling, which optimizes database connections for improved application performance.

The JPA and Object-Relational Mapping module introduces the Java Persistence API (JPA), which simplifies database interactions by mapping Java objects to database tables. You'll learn to define entities, manage persistence contexts, and use JPQL (Java Persistence Query Language) for querying data. This section emphasizes best practices for designing entities and managing relationships between them.

Transaction Management in Java EE explores how to ensure data consistency and integrity in web applications. You'll learn about local and global transactions, managing transaction boundaries, and how to implement transaction handling using JTA (Java Transaction API). This module also covers key concepts like isolation levels and concurrency control.

In the Security for Java EE Web Applications section, you'll learn about securing web applications using Java EE security features. This module covers authentication, authorization, role-based access control, and securing data with HTTPS. You'll also explore how to configure security constraints in web.xml and implement programmatic security checks.

The Web Application Deployment and Configuration module focuses on packaging and deploying Java EE web applications in various environments. You'll learn how to use web.xml for configuring Servlets, filters, and listeners, as well as deploying your application to popular Java EE servers like Apache Tomcat and WildFly.

The course concludes with Best Practices for Java EE Web Development, where you'll learn to design efficient, maintainable, and secure web applications. You'll explore patterns such as MVC (Model-View-Controller), DAO (Data Access Object), and Front Controller, and how to use these patterns to improve your application’s architecture.

By the end of this course, you'll have the skills to develop fully-functional Java EE web applications that connect to databases using JDBC and JPA. You’ll be able to build scalable, secure, and efficient applications that meet enterprise standards, preparing you to tackle complex web development challenges with confidence.

Course Benefits

  • Design and build robust and maintainable web applications
  • Create dynamic HTML content with Servlets and Java ServerPages, using the JSP Standard Tag Library (JSTL)
  • Make Servlets and JSP work together cleanly
  • Use JSTL and other Custom Tag Libraries to separate Java and HTML code
  • Access databases with JDBC and the JPA (Java Persistence API)
  • Structure a clean data access layer.
  • Gain a high level understanding of REST services and JAX-RS

Delivery Methods

Course Outline

  1. Java EE Introduction
    1. Java EE Overview and Technologies
    2. JEE Architecture Choices
    3. Java Web App Introduction
  2. Servlet Basics
    1. Servlet Basics and Capabilities
    2. Basics of Writing a Servlet
    3. HTML Forms Review
    4. HTTP Review: Request-response, headers, GET, POST
    5. Overview: How Servlets Work
    6. Servlet Lifecycle and API - Servlet, HttpServlet, @Webservlet
    7. Requests and Responses - HttpServletRequest and HttpServletResponse
    8. Accessing Parameters
    9. web.xml
  3. Additional Servlet Capabilities
    1. Working with HttpServletResponse (Errors, Headers, MIME types)
    2. Initialization
    3. Overview
    4. Using ServletConfig and ServletContext
    5. Init Parameters - Servlet and Web App
    6. Error Handling: Error Pages and Their Configuration
  4. JavaServer Pages
    1. Basics and Overview
    2. JSP architecture
    3. JSP tags and JSP expressions
    4. Fixed Template Data
    5. Lifecycle of a JSP
    6. Model View Controller (MVC)
    7. Overview
    8. Java EE Model 2 Architecture
    9. Servlets as Controllers, RequestDispatcher, Forwarding and Including
    10. Data Sharing in a Web App
    11. Object scopes or "buckets"
    12. Using JavaBeans to Hold Data
    13. Using the Scope Objects - get/set/remove Attributes
    14. Request, application, session and page scope
    15. JSP Expression Language (EL) and Data Access
    16. JSP EL Overview
    17. JSP Expressions, and Accessing Data
    18. Predefined JSP EL implicit objects (pageContext, param, header, scope objects)
    19. pageContext in Detail
    20. jsp:include, jsp:forward, the page Directive
    21. JSP Error Pages
  5. Using Custom Tags
    1. Custom tags overview
    2. Tag Libraries Overview
    3. taglib Directive - Using a Tag Library
    4. JSTL
    5. Overview
    6. c:out, c:forEach
    7. c:url, c:param
    8. More about JSTL
    9. Other Useful Core Tags < - c:if, c:choose
    10. Formatting: formatNumber, formatDate, Resource Bundles
  6. HTTP Session Tracking
    1. HTTP and Client State
    2. Cookies - Overview, Servlet Access, Usage, Issues
    3. Sessions
    4. Servlet/JSP Session Support, HttpSession
    5. Using Sessions - Putting Data in, Retrieving Data From
    6. How Sessions Work
  7. Web Security
    1. JEE Security Overview
    2. Role Based Security
    3. Declarative Security
    4. Web Authentication - Basic, Form-Based, Digest, HTTPS Client
    5. Using Basic Authentication
    6. Using Form-Based Authentication
    7. Programmatic Security - HttpServletRequest, Retrieving Roles
  8. Additional Servlet Capabilities
    1. Custom Tags Using Tag Files - Overview, Writing and Using Tag Files, Tag Attributes
    2. Servlet Filter overview - Example and lifecycle
    3. WebSocket Overview
  9. JDBC Introduction and Architectur
    1. Relational Database and JDBC Overview
    2. JDBC Architecture, JDBC API Overview
    3. Connecting to a database
    4. Working with JDBC - Executing Statements and Processing Results
  10. Resource Integration
    1. DataSources and Connection/Statement Pooling
    2. Resource Injection, @Resource, and JNDI
    3. CDI and Dependency Injection
  11. Introduction to JPA
    1. JPA Architecture and Programming View
    2. Entity Classes and Annotations
    3. Mapping an Entity Class
    4. EntityManagerFactory and EntityManager
    5. Working with JPA (Find by primary key and inserts)
    6. Integrating JPA with the Web Tier
  12. JPA Advanced Topics
    1. Entity Lifecycle
    2. Relationships
    3. Issues with Relationships (Lazy Load and Web Apps)
  13. Introduction to REST
    1. Overview and Principles
    2. REST Characteristics
    3. Resources and Operations
    4. REST Principles
    5. Requests and Responses
    6. REST APIs
    7. URI Templates
    8. GET, POST, PUT, DELETE
    9. Safe and Idempotent Methods
  14. Introduction to JAX-RS
    1. APIs and Implementations
    2. JAX-RS Overview, Annotations
    3. JAX-RS Implementations
    4. Runtime Environment
    5. Application Server, Servlet-Only Container
    6. Architectural and Implementation Perspectives
    7. Configuring the Application
    8. Applications, Resources, and Providers
    9. JAX-RS Applications
    10. Resource Classes and @Path
    11. Provider Classes and @Provider
    12. Default Lifecycles
    13. The Application Class and rest-path
    14. Ajax-JavaScript Clients
    15. Overview
    16. Classic vs. Ajax Interactions
    17. Working with Ajax-JavaScript

Class Materials

Each student receives a comprehensive set of materials, including course notes and all class examples.

Have questions about this course?

We can help with curriculum details, delivery options, pricing, or anything else. Reach out and we’ll point you in the right direction.