Skip to main content

Instructor-led training

Fast Track to Java Servlets and JSP Developer's Workshop Training in Lafayette, Colorado

This course is a comprehensive tutorial in the design and programming of Java Web applications using servlets and JSP.

What you'll learn

This course is a comprehensive tutorial in the design and programming of Java Web applications using servlets and JSP. It starts with Web application architecture, usage, and deployment. It teaches about the capabilities of servlets, servlet architecture, and session management, JSP structure and syntax, and good design techniques for using them. Extensive coverage is included on how to efficiently use the JSP Expression Language (EL), custom tags, and the JSTL library. The course is current with the latest releases of the specification, and uses the latest capabilities to write Web applications in the most efficient way possible. This includes the use of the JSP Expression Language directly in JSP 2.0+ Web pages, an overview of creating custom tags with tag files, and other new capabilities that make the framework much more user friendly. The complete course will give you excellent experience on how to build robust and capable Web applications using the latest features of the Java EE Web container.

Private Training for Teams

This course is offered as private, instructor-led training for organizations, onsite in Lafayette, Colorado or live online. Dates, delivery format, and course content are arranged around your team's requirements.

This course is not currently scheduled as a public class for individual enrollment.

Request Group Training

Prerequisites

Some Java, HTML, and XML programming experience is recommended.

Course Outline

Web Application Basics
How the Web works, Thin Clients,  TCP/IP
HTTP overview, Brief HTML review
Overview of J2EE
Web Applications - Structure and Contents
Servlet Basics and Capabilities
Basics of Writing a Servlet
Labs:
Setup development environment and server; Create a simple web application
Create a Simple Servlet
 
Servlet API
HTML Forms Review
HTTP Review: Request-response, headers, GET, POST
Overview: How Servlets Work
Servlet Lifecycle: init(), service(), destroy()
API: Servlet, ServletConfig, ServletRequest, ServletResponse, GenericServlet,
Requests and Responses - Using ServletRequest and ServletResponse
HTTP Servlets: HttpServlet, HttpServletRequest, HttpServletResponse
Accessing Parameters
More About web.xml
Labs:
Using Client Input, Retrieving parameters
 
Additional Servlet Capabilities
Working with HttpServletResponse
Status/Errors
Response Headers
MIME Types
Initialization
Overview
Using ServletConfig and ServletContext
Init Parameters - Servlet and Web App
Error Handling: Error Pages and Their Configuration
Labs:
Using Model Classes, Generating Simple Output
 
JavaServer Pages
Basics and Overview
JSP architecture
JSP tags and JSP expressions
Fixed Template Data
Lifecycle of a JSP
Model View Controller (MVC)
Overvie
Java EE Model 2 Architecture : Servlet Controllers, JSP Views, JavaBeans Glue
Servlets as Controllers
Using RequestDispatcher
Forwarding and Including
Data Sharing in a Web App
Object scopes or "buckets"
Using JavaBeans to Hold Data
Using the Scope Objects - get/set/remove Attributes
Request, application, session and page scope
JSP Expression Language (EL) and Data Access
JSP EL Overview
JavaBeans and the EL
Predefined JSP EL implicit objects (pageContext, param, header, scope objects)
<jsp:useBean>, <jsp:getProperty>, <jsp:setProperty>
jsp:include, jsp:forward, the page Directive
Labs:
Create a Simple JSP Page
Put Data on a Scope and Forward to a JSP
Use the JSP Expression Language
 
Using Custom Tags
Custom tags overview
Reducing JSP complexity
Tag Libraries
Overview and TLD (Tag Library Descriptor)
taglib Directive - Using a Tag Library
JSTL
Overview
c:out, c:forEach
c:url, c:param
Labs:
Use c:forEach for Iteration
Working with Links and c:url
 
HTTP Session Tracking
HTTP Session Overview
HTTP as a stateless protocol
Hidden form fields
Cookies
Overview and Servlet API
Using Cookies, Persistent and Session Cookies
Issues
Sessions
Servlet/JSP Session Support, HttpSession
Using Sessions - Putting Data in, Retrieving Data From
How Sessions Work
Labs:
Storing and Using Session Data
 
More JSP Capabilities
Error Pages
Error Pages and Exception Handling
The implicit exception Object
JSP 2.0+ Error Handling and errorData Object
Directives (page, include, others)
JSPs as XML Documents
Scriptlets - Overview and Usage
Labs:
Using Error Pages
{optional} Using Scriptlets
Session 8: More JSTL and EL
More About the JSTL
Core, Formatting, SQL, XML, Functions Libraries
Custom Tag Architecture and Tag Library Structure
c:if, c:choose, c:import
Formatting: formatNumber, formatDate, Resource Bundles
Using Common Tags
XML Action Example
More About the JSP EL
Syntax, Identifiers, Literals, Operators
Implicit Objects
The pageContext in Detail
Type Coercion
String concatenation
Using Common Tags
c:if, c:choose
c:set
fmt:formatDate, fmt:formatNumber
Labs:
Using c:if, c:choose, c:when and c:otherwise to customize output
[Optional]: Using the Function Library
JSTL Format Tags
Session 9: Security
J2EE Security Overview
Role Based Security
Declarative Security
Web Authentication - Basic, Form-Based, Digest, HTTPS Client
Using Basic Authentication
Using Form-Based Authentication
Programmatic Security - HttpServletRequest, Retrieving Roles
Labs:
Securing a Web App, Setting Up and Using a Security Domain
 
Additional Topics
Design Issues
Dividing Responsibilities Between Servlets/JSP
Network Overhead
Scalaibility - Clustering, Serving Static Content
Other Guidelines - Using the Technology Well
Custom Tags Using Tag Files
Overview and Writing Tag Files
Tag Attributes
The tag Directive
Servlet Filter overview
Filtering examples, lifecycle, & filter chains
Filter API, Modifying a request, Modifying a response
Java ServerFaces (JSF) Overview
Advanced MVC – JSF overview
JSF Components
Process Flow
Advantages and Disadvantages

What makes servlets and JSP hard to master

The Java syntax is rarely the obstacle. The difficulty is that a web container, not your code, controls object creation, request dispatch and session state. The syllabus builds up in a deliberate order.

  • HTTP first. Request-response, headers, GET versus POST, and HTML forms come before any servlet code. Sessions only make sense once you see that HTTP is stateless, which is why hidden form fields and cookies are taught before HttpSession.
  • The servlet lifecycle. init(), service() and destroy(), plus ServletConfig, ServletContext and the init parameters configured in web.xml. A frequent misconception is that each request gets its own servlet. The container manages instances, so where you keep data matters.
  • Scopes. Page, request, session and application scope, with get/set/remove attribute calls and JavaBeans as carriers. Choosing the wrong bucket is a common source of stale or shared data.
  • Model 2 MVC. Servlet controllers, JSP views and JavaBeans glue, connected with RequestDispatcher forward and include. JSP is often mistaken for a separate technology, so the lifecycle-of-a-JSP topic helps show how it relates to servlets.
  • EL, custom tags and JSTL. Implicit objects, pageContext, type coercion and operators, then c:forEach, c:if, c:choose, the formatting tags, TLDs and tag files. These are what let you keep scriptlets out of pages.
  • Security. Declarative role-based security with Basic and Form-Based authentication is paired with programmatic checks through HttpServletRequest. Keeping the two consistent takes care.

Who it suits and what to take around it

This introductory, three-day course suits Java developers who are new to web programming, and teams that maintain or support existing servlet/JSP applications. The recommended background is some Java, HTML and XML. The syllabus references Java SE 7 and earlier, which the lifecycle data lists as out of support. That makes the course a fit for organizations that build, maintain or migrate systems on those versions.

If your Java is thin, Fast Track to Java for OO Developers covers the language and object-oriented groundwork that the servlet API assumes. Because this course has no JDBC or database-access topics, teams that need data access in the same effort can look at Fast Track to Java EE 5 with Servlets, JSP & JDBC on Tomcat/Eclipse.

Organizations working with newer Java or web-container releases can ask about private training tailored to the versions they use through a training proposal.

Illustrative scenarios

The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.

  • A request-driven lookup page. A team might write a servlet that reads form parameters, calls a model class, places a JavaBean in request scope and forwards to a JSP. The page renders the result with EL and c:forEach. This follows the Model 2 pattern of controller, bean and view.
  • Restricting an admin area. A team might protect a set of URLs with role-based declarative security and form-based login, then use programmatic role checks in a servlet for finer decisions. This draws on the security session and HttpServletRequest role retrieval.
  • Cleaning up legacy pages. A group inheriting scriptlet-heavy JSPs might move logic into servlets, replace scriptlets with JSTL and EL, extract repeated markup into tag files, and add error pages and a servlet filter for cross-cutting behavior.

AI coding assistants with servlets and JSP

AI coding assistants can draft a servlet skeleton, a web.xml mapping, a JavaBean or a JSP that iterates a list with JSTL. They save time on this boilerplate. They also fail in predictable ways for these topics:

  • They may generate code for a different container or specification level than your project uses, such as annotation-based configuration where your deployment expects web.xml, or scriptlets where your standards call for EL and JSTL.
  • They may put per-user data in a servlet field or in application scope. Because the container shares servlet instances across requests, this creates thread-safety and data-leak bugs.
  • They may print request parameters unescaped, skipping c:out, or build session handling and authentication that bypasses the container's declarative security.

To verify, deploy to your target container and test with more than one concurrent user. Inspect the scope each attribute is stored in. Confirm that the security constraints in the descriptor actually block unauthorized requests. Review any output that echoes user input.

Frequently asked questions

What level is this course and what should I know first?

It is introductory. Some Java, HTML and XML programming experience is recommended. You do not need prior servlet or JSP experience.

What does the course cover?

Web application structure, the servlet API and lifecycle, HttpServletRequest/Response, session tracking with cookies and HttpSession, JSP, Model 2 MVC with RequestDispatcher, the Expression Language, JSTL and custom tags, error pages, security, tag files and servlet filters. JSF is covered as an overview only.

Does it include database access?

No. The syllabus does not list JDBC or persistence topics. Labs use model classes to supply data.

Can this be delivered privately for our team, onsite or online?

Yes. HSG provides private training for organizations, delivered at the client's location or live online.

Can the content be customized to our Java or container versions?

Private courses can be tailored to the technology versions an organization uses, including current releases. Send details through the training proposal request.

Training locations

Fast Track to Java Servlets and JSP Developer's Workshop training across the U.S. and beyond.

We provide private Fast Track to Java Servlets and JSP Developer's Workshop training for organizations, onsite at your location or live online, throughout the United States and internationally.

View all Fast Track to Java Servlets and JSP Developer's Workshop training locations

Train your team with HSG

Private, instructor-led training customized for your organization.

  • Onsite or live online delivery
  • Customized curriculum
  • For a single employee or an entire team
  • Flexible scheduling
  • Experienced instructors
Request Group Training

Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com

Ready to train your team?

Let's customize this training for your organization.

Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.