Learning Patterns Your Source for Quality Technology Courseware

Servlets and JSP Quick Start

This course provides a quick introduction to Servlets and JSP, a key server-side Java Web technology. It is useful in situations where developers need to be familiar with it, but don't need to know all of their many details. It is usually used along with other course materials to make a longer course.

The course is hands on with a good selection of labs. It will provide the information needed to be comfortable working directly with Servlets and JSPs, or with other frameworks that build on them.

Course Information:

Course Code: SJSP-QUICK

Price: $50

Duration: 1-1/2 days

Labs: many hands-on labs (minimum 50% of course)

Prerequisites: Working knowledge of Java programming, including use of inheritance, interfaces, and exceptions

Supported Software Environments:

  • Standard: Java 11 and Eclipse IDE
  • Standard: Java 17 and Eclipse
  • Standard Web Container: Tomcat
(Non-standard software may require additional wait and incur additional charges.)

Course Objectives:

  • Develop Servlets to process requests
  • Use Servlet 3 annotations and web.xml for configuration
  • Understand and create JavaServer Pages (JSPs)
  • Understand and use basic custom tags from the JSTL
  • Link Servlets and JSPs, and share data between them
  • Understand and use good design techniques including MVC (Model-View-Controller) and the Model 2 architecture
     

Course Outline:

  • Session 1: Web Application Basics
    • JEE Overview
    • HTML and HTTP - Quick Look
    • A Simple Java Servlet
  • Session 2: Servlet Basics
    • Overview: How Servlets Work
    • Servlet Lifecycle: init(), service(), destroy()
    • API: Servlet, @WebServlet, ServletConfig, ServletRequest, ServletResponse, GenericServlet,
    • Requests and Responses - Using ServletRequest and ServletResponse
    • HTTP Servlets: HttpServlet, HttpServletRequest, HttpServletResponse
    • Accessing Parameters
    • More About web.xml
  • Session 3: JavaServer Pages
    • Basics and Overview
    • JSP Expressions
    • Model View Controller (MVC)
      • Overview
      • Servlets as Controllers, Using RequestDispatcher
      • JSP as the View
      • Forwarding to a JSP
    • Data Sharing among Servlets and JSP
      • Object scopes or "buckets" - request, session, application, page
      • Using JavaBeans to Hold Data
    • JSP Expression Language (EL) and Data Access
      • JSP EL Overview
      • JavaBeans and the EL
      • Predefined JSP EL implicit objects (pageContext, param, header, scope objects)
  • Session 4: Using Custom Tags
    • Custom tags overview
    • Custom Tag Libraries
    • TLD - Tag Library Descriptor
    • JSTL
      • Overview
      • Common tags, c:out, c:forEach, etc
  • Session 5: HTTP Session Tracking
    • HTTP is Stateless
    • HTTP Sessions
    • Using Sessions