Skip Ribbon Commands
Skip to main content

FTServlets_JSP - Fast Track to Servlets and JSP Developer’s Workshop


Duration: 3 Days




Delivery Method:

Software Assurance Value:

Microsoft CPE:

Course Information

Course Description

​Servlets and JSP (JavaServer Pages™) are key server-side Java™ technologies for building web applications. Servlets are programs that run on a web server; they can respond to client requests and create dynamic content. JSPs are useful for displaying dynamic data, and allowing Java developers and Web page designers to work together easily. The JSTL is a tag library for JSP that encapsulates the core functionality common to many Web applications using custom tags. These include tags for iteration, conditionals, XML manipulation and much more.
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. All labs can be done with the Eclipse IDE Java EE version, and the lab instructions include detailed directions for using it.

Course Objectives

Course Audience

​Developers and designers interested in advancing their knowledge of Servlets, JSPs, and JSTL.

Course Outline

1. Web Application Basics
  • How the Web Works
  • Clients and Servers
  • HTML – The Language of the Web
  • HTTP, Addressing, Requests, and Responses
  • Browsing a Simple Web Page
  • Java EE – Java Enterprise Edition Basics
  • Simple Web-Based Architecture
  • Java EE Web Applications
  • Web Application Structure
  • A Simple Servlet
  • Servlets and Dynamic Content
  • What Are Servlets?
  • How a Servlet Runs
  • Advantages of Servlets
  • Packages and Classes
  • Creating a Servlet – The Simplest Way
  • A Simple HTTP Servlet
  • Declaring and Mapping Servlets
2. Servlet Basics
  • HTML Forms and HTTP Review
  • HTML Forms
  • A Simple Search Form in HTML
  • HTTP Request and Response Details
  • GET and POST Methods
  • Request Parameters
  • How Servlets Work
  • Servlet Interface and Servlet Lifecycle
  • Servlet Lifecycle – Initialization
  • Servlet Lifecycle – The service() Method
  • Important Types for Servlets
  • Class Diagram for Servlet Types
  • Class GenericServlet
  • Requests and Responses
  • Important ServletRequest / Respoonse Methods
  • Getting Data / Sending Responses
  • Getting Data and Sending Response
  • HTTP Servlets
  • Class HttpServlet
  • HttpServletRequest Interface
  • More About web.xml
  • Look at the JAVADOC
3. Additional Servlet Capabilities
  • HTTP Responses – Status and Errors
  • HttpServletResponse Status/Error Methods
  • HTTP Response Headers
  • Setting Response Headers
  • MIME Types
  • Specifying a MIME Type
  • Initialization Overview
  • The ServletConfig Interface
  • The ServletContext Interface
  • Declaring and Mapping Servlets
  • Servlet Init Parameters
  • A Problem with SearchServlet
  • Null and Empty String Parameters
  • Error Handling
  • Specifying Error Pages
  • Error Page Configuration
  • Error Handling
4. JavaServer Pages (JSP)
  • Shortcomings of Servlets
  • What is a JSP?
  • A Very Simple JSP – simple.jsp
  • JSPs Look Like HTML
  • JS{ Expressions
  • JSP Comments
  • JSPs are Really Servlets
  • The Generated Servlet
  • Model View Controller (MVC) Architecture
  • Servlet and JSP Architecture
  • Model View controller (MVC)
  • Servlets as the Controller
  • JSP as the View
  • JavaBeans as the Glue and the Model
  • Servlets as Controllers
  • RequestDispatcher
  • Servlets as Controller
  • Forwarding to a Resource
  • Including Output of Another Resource
  • RequestDispatcher Paths
  • Data Sharing Among Servlets and JSPs
  • Object Bucket or Scopes
  • Using the Scope Objects
  • JSP and JavaBeans
  • Putting Data on a Scope
  • The Other Scopes
  • Careful – Servlets are Multi-Threaded
  • JSP Expression Language and Data Access
  • JSP Expression Language (EL)
  • Data Objects and the EL
  • JavaBeans and the EL
  • Implicit Objects (Predefined EL Variables)
  • JSP Mixes Dynamic and Template Data
  • <jsp:useBean>
  • JavaBean Properties
  • JSP Directives
  • The Include Directive - <%@include%>
  • The Include Action - <jsp:include>
  • <jsp:forward> Action
  • The Page Directive
5. Using Custom Tags
  • Custom Tag Libraries Overview
  • Issues with Vanilla JSP
  • Sun’s Solution – Custom Tags
  • Custom Tag Overview
  • Tag Libraries
  • Using a Tag Library in a web Application
  • Taglib Definition – How it Works
  • More About URIs and Prefixes
  • JSP Standard Tag Library (JSTL)
  • Need for Iteration
  • Using the c:param Tag for URL Parameters
  • Using c:param with c:url
6. HTTP Session Tracking
  • HTTP Session Overview
  • HTTP is a Stateless Protocol
  • Online Shopping with a Stateless Protocol
  • Storing Contextual Information
  • Hidden Form Fields
  • Cookies
  • Cookie Details
  • Accessing Cookies with the Servlet API
  • Persistent Cookies and Session Cookies
  • Cookie Usability Issues
  • Sessions
  • Servlet JSP Sessions
  • Using Sessions
  • How Session Tracking Works
  • Sessions and Cookies – How They Work
7. More JSP Capabilities
  • Error Pages
  • Servlet Exceptions and Error Pages
  • The Implicit Exception Object
  • JSP 2.0 Error Handling
  • Using ErrorData
  • Exception Handling in a JSP
  • web.xml – Declarative Exception Handling
  • Server Logging
  • JSPs as XML Files
  • JSP Pages as XML Documents
  • Java Scriptlets
  • Scriptlets
  • How do Scriptlets Works?
  • Another Simple JSP – simple.jsp
  • Generated Code Fragment for simple.jsp
  • When to Use Scriptlets
  • Declarations
8. More JSTL and EL
  • More About JSTL
  • JSTL Tag Libraries at a Glance
  • Custom Tag Architecture
  • More About JSTL URIs and Prefixes
  • Some Other Common Core Actions
  • Formatting Library
  • SQL Library XML Library
  • JSTL 1.1 Functions Library
  • JSTL Function Library
  • More About the JSP EL
  • EL Syntax
  • EL Identifiers
  • EL Operators
  • . and [] Operators
  • JSP EL Implicit Objects
  • PageContext Properties
  • JSP EL Literal Values
  • Conditional Operator
  • Using Common Tags
  • Putting JSTL and EL in JSP
  • Using <c:if>
  • <c:if> Test Expressions
  • <c:choose>
  • More on <c:foreach>
  • <c:set>
  • <fmt:formatdate>
  • <fmt:formatnumber>
  • JSTL-EL Resources
9. Security
  • Java EE Security Overview
  • Security Requirements
  • Java EE Security
  • Web Tier Security in Java EE
  • Transport Level Security with HTTPS/SSL
  • Declarative Security
  • Declarative Role-Based Security
  • Specifying Security constraints
  • Security Constraints – Deployment Descriptor
  • Mapping Users to Roles
  • Security – The Big Picture
  • Web Authentication
  • HTTP Basic Authentication
  • HTTP Basic Authentication on the Browser
  • Configuring Basic Authentication
  • Basic Authentication Pros and Cons
  • Form Based Authentication
  • Using Form Based Authentication
  • Form Based Authentication Pros and Cons
  • Digest Authentication
  • Digest Authentication Pros and Cons
  • HTTPS Client Authentication
  • Programmatic Security
  • Programmatic Security – HttpServletRequest
  • 10. Additional Topics
  • Design Issues
  • Divide and Conquer
  • Minimize Network Overhead
  • Scalability – Clustering
  • Sessions and Clustering
  • Scalability – Separating Static Content
  • Scalability – Java Virtual Machine
  • Scalability – CPUs and 64 Bit Machines
  • Maintainability – Write Your JSPs Well
  • Use the Technology Wisely
  • Use a Framework
  • The Java Blueprints
  • Custom Tags Using Tag Files
  • Creating Custom Tags with Tag Files
  • Adding Attributes to Tags
  • The Tag Directive
  • Other Tag File Capabilities
  • Servlet Filter Overview
  • Filter API
  • Filter Processing
  • Filter Chain
  • A Simple Filter
  • Filter is Mapped in the web.xml file
  • How a Filter Can Modify a request or Response
  • The Way a Response Normally Works
  • Manipulating the Response
  • Wrapping the Response
  • JavaServer Faces (JSF) Overview
  • Vanilla Servlet/JSP Shortcomings
  • JavaServer Faces
  • JSF Architecture
  • JSF Capabilities
  • JSF Components
  • The UI Runs on the Server
  • Event Handling
  • Process Flow
  • JSF Advantages
  • JSF Disadvantages

Course Prerequisites

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

Course Schedule
This course is not scheduled yet.