Web App Development with Java Servlets & JSP

JHU Dorsey Center, Elkridge MD
Co-Sponsored by Johns Hopkins Engineering for Professionals

This class is now over. Public courses have shifted from servlets/JSP to JSF 2 (with PrimeFaces) due to the higher-level nature and more powerful features of JSF 2. However, if your project is already using servlets and JSP, we would be happy to do a customized onsite course at your location. Lower price, more convenient for your developers, and customizable content. Contact hall@coreservlets.com for details.

“Wonderful. In 20 years, this is the best organized, most pragmatic and enjoyable course I've taken.”

“The best instructor-led course I have attended, by far.”

“Best short course ever!”

“Compared to the other short courses I have taken, this one completely redefined my scale from 1-10.”

“In my 35+ years of taking technical courses, Marty's classes consistently come out ranking #1 on my list. Highly relevant material is delivered with enthusiasm, humor, and a high degree of class interaction that is unmatched anywhere.”

more student reviews

This page describes the public training course on JSP and servlet programming to be held at in Elkridge, MD (co-sponsored by the Johns Hopkins University Engineering for Professionals program). The entire course is personally developed and taught by leading Java developer, speaker, and author Marty Hall. No contract instructor regurgitating someone else's materials! Marty has taught Java technology courses onsite for dozens of organizations in the US, Canada, Mexico, Australia, Japan, Puerto Rico, India, and the Philippines, all to rave reviews.

If you are looking for customized training courses on Java 7 or 8, JSF 2, PrimeFaces, Android, Ajax, jQuery, Hadoop (and Hadoop cerfication), GWT, Spring, Hibernate, Servlets, JSP, HTML5, or RESTful Web Services taught on-site at your company, please see this page.

Register Early! Five of Marty's previous public short courses were full, so reserve your spot today. Registrations are taken in the order they are received.

Course Overview

The Java EE Platform has become the technology of choice for developing professional e-commerce applications, interactive Web sites, and Web-enabled applications and services. Servlet and JSP technology is the foundation of this platform: it provides the link between servers and Web clients (browsers, cell phones, Ajax applications, etc.). This course provides a practical, hands-on introduction to building Web applications in Java. It gives details on the most important topics, surveys more advanced or lesser-used topics, stresses best practices, and gives plenty of working examples. Each section is followed by a series of hands-on exercises that use servlets, JSP, Eclipse, and Tomcat to reinforce the concepts. There are a choice of exercises of varying complexity so as to accommodate developers with various levels of expertise and previous experience.

Marty normally runs on-site training courses at customer locations. This is easier administratively, is better for clients since the topics and schedule can be customized, and is more cost effective for students since no travel is required. However, due to demand from those who do not have enough students for an on-site course, Marty will be running a public (open enrollment) servlet and JSP training course March 7-11 at the Johns Hopkins Dorsey Center in Elkridge MD.

The course is developed and taught by Marty Hall, an experienced developer, award-winning instructor, popular conference speaker (5 times at JavaOne), and author of several bestselling J2EE books. The course is based on the second edition of Marty's book Core Servlets and JavaServer Pages, and each student will receive their own copy as well as a bound student notebook.

About the Instructor

Marty and Gosling @ Marty's car

Marty & Java inventor James Gosling at Marty's car.

Marty Hall is the author of six popular Java EE books, including Core Servlets and JavaServer Pages, the all-time worldwide bestselling servlet/JSP book, published in Bulgarian, Chinese Simplified Script (Mainland China), Chinese Traditional Script (Taiwan), Czech, Greek, English, French, German, Hebrew, Japanese, Korean, Macedonian, Polish, Portuguese, Russian, and Spanish. Marty is president of coreservlets.com, a training and consulting company focusing on server-side Java technology and Rich Internet Apps with Ajax. In addition to long Java development and consulting experience, Marty has an extensive background in teaching and training, having given training courses on J2EE, JSF 2.0, GWT, and Ajax topics in Japan, Canada, Australia, the Philippines, Mexico, Puerto Rico, India, Cambodia, and dozens of US venues. A popular and entertaining speaker, Marty has spoken at conferences and user groups around the world, including Comdex, the Web 2.0 Expo, the Great Indian Developer Summit, and five times at JavaOne. Marty is also adjunct faculty in the Johns Hopkins University part-time graduate program in Computer Science, where he directs the Java and Web-related concentration areas.


The course consists of an approximately equal mixture of lecture and hands-on lab time. The course assumes that all students already have at least moderate previous Java experience, but not necessarily any experience with server-side Java or HTTP. Although the course will use Java 6, previous experience with earlier Java versions is sufficient. However, the course will definitely move too fast for those with little or no previous experience with Java. Working knowledge of HTML is helpful but not absolutely required.


JHU/EP Logo The course will be held at the Johns Hopkins Dorsey Center in Elkridge, Maryland. This is a modern, comfortable venue with separate computers for each student, fast internet connections, and with coffee, snacks, and meals included. Class meets from 8:30 am to 4:30 pm daily. For students who prefer to bring their own laptops, fast wifi is available, and you can email the instructor for information on installing the class software in advance.

For Maryland residents, the location is centrally located 5 minutes from BWI airport and has plenty of free parking. For out-of-town students, there are many hotels within 1 mile.


The five-day course costs $2695 per student and includes an extensive course notebook, a commercial textbook, exercises, and exercise solutions. Free breakfast, snacks, and lunch. Compare this price to courses from Learning Tree, GlobalKnowledge, and Oracle University that cost $3500-$4200 for five-day courses and $2800-$3000 for four-day courses and that do not include textbooks or meals. Besides, those courses almost always use an unknown instructor who did not develop the course materials and often lacks significant real-world development experience.

To register, fill out and send in the course registration form. Space is limited: five previous offerings of coreservlets.com courses were full. Bonus: Register at least two weeks in advance and get a $100 gift certificate from amazon.com.

Questions and More Info

  • Guinea pigs? No! Marty's courses are well-tested, having been taught in 8 countries and dozens of US venues. We don't use your developers as guinea pigs for new materials.
  • Regurgitation? No! Marty developed all his own materials. No contract instructor regurgitating memorized PowerPoint slides.
  • Green? No! Marty is an experienced developer, and is the author of 6 popular Java EE texts from Prentice Hall. The course gives best practices and real-world strategies. No newbie instructor dodging tough questions.


Course now includes an introduction to Ajax

Overview and Setup

  • Understanding the role of servlets
  • Evaluating servlets vs. other technologies
  • Understanding the role of JSP
  • Configuring Tomcat
  • Configuring Eclipse
  • Deploying Apps from Eclipse

Servlet Basics

  • The basic structure of servlets
  • A simple servlet that generates plain text
  • A servlet that generates HTML
  • Servlets and packages
  • Some utilities that help build HTML
  • The servlet life cycle
  • Servlet debugging strategies

Handling the Client Request: Form Data

  • The role of form data
  • Creating and submitting HTML forms
  • Reading individual request parameters
  • Reading the entire set of request parameters
  • Handling missing and malformed data
  • Dealing with incomplete form submissions
  • Filtering special characters out of the request parameters

Handling the Client Request: HTTP Request Headers

  • Reading HTTP request headers
  • Building a table of all the request headers
  • Understanding the various request headers
  • Reducing download times by compressing pages
  • Differentiating among types of browsers

Generating the Server Response: HTTP Status Codes

  • Format of the HTTP response
  • How to set status codes
  • What the status codes are good for
  • Shortcut methods for redirection and error pages
  • A servlet that redirects users to browser-specific pages
  • A front end to various search engines

Generating the Server Response: HTTP Response Headers

  • Format of the HTTP response
  • Setting response headers
  • Understanding what response headers are good for
  • Building Excel spread sheets
  • Generating JPEG images dynamically
  • Sending incremental updates to the browser

Handling Cookies

  • Understanding the benefits and drawbacks of cookies
  • Sending outgoing cookies
  • Receiving incoming cookies
  • Tracking repeat visitors
  • Specifying cookie attributes
  • Differentiating between session cookies and persistent cookies
  • Simplifying cookie usage with utility classes
  • Modifying cookie values
  • Remembering user preferences

Session Tracking

  • Implementing session tracking from scratch
  • Using basic session tracking
  • Understanding the session-tracking API
  • Differentiating between server and browser sessions
  • Encoding URLs
  • Storing immutable objects vs. storing mutable objects
  • Tracking user access counts
  • Accumulating user purchases
  • Implementing a shopping cart
  • Building an online store

JSP Intro and Overview

  • Understanding the need for JSP
  • Evaluating the benefits of JSP
  • Comparing JSP to other technologies
  • Avoiding JSP misconceptions
  • Understanding the JSP lifecycle
  • Installing JSP pages
  • Looking at JSP in the real world

Invoking Java Code with JSP Scripting Elements

  • Static vs. dynamic text
  • Dynamic code and good JSP design
  • JSP expressions
  • Servlets vs. JSP pages for similar tasks
  • JSP scriptlets
  • JSP declarations
  • Predefined variables
  • Comparison of expressions, scriptlets, and declarations

Including Files and Applets in JSP Pages

  • Using jsp:include to include pages at request time
  • Using <%@ include ... %> (the include directive) to include files at page translation time
  • Understanding why jsp:include is usually better than the include directive
  • Using jsp:plugin to include applets for the Java Plug-in

Controlling Web App Behavior with the Deployment Descriptor (web.xml)

  • Location and purpose of web.xml
  • Custom URLs
  • Initialization parameters
  • Preloading pages
  • Welcome pages
  • Error pages

Integrating Servlets and JSP: The Model View Controller (MVC) Architecture

  • Understanding the benefits of MVC
  • Using RequestDispatcher to implement MVC
  • Forwarding requests from servlets to JSP pages
  • Handling relative URLs
  • Choosing among different display options
  • Comparing data-sharing strategies

Simplifying Access to Java Code: The JSP 2.0 Expression Language

  • Motivating use of the expression language
  • Understanding the basic syntax
  • Understanding the relationship of the expression language to the MVC architecture
  • Referencing scoped variables
  • Accessing bean properties, array elements, List elements, and Map entries
  • Using expression language operators
  • Evaluating expressions conditionally

JSTL: Handling Variable-Length MVC Data

  • Obtaining JSTL documentation and code
  • The JSTL Expression Language
  • Looping Tags
  • Conditional Evaluation Tags
  • Database Access Tags
  • Other Tags

Ajax: Asynchronous Page Updates

  • Ajax motivation
  • The basic Ajax process
  • The need for anonymous functions
  • Using dynamic content and JSP
  • Using dynamic content and servlets
  • Displaying HTML results

Creating Custom JSP Tag Libraries: The Basics

  • Java-based tags
    • Components of a tag library
    • Basic tags
    • Tags that use body content
    • Tags that optionally use body content
  • JSP-based tags (tag files)
    • Components of a tag library
    • Basic tags
    • Tags that use attributes
    • Tags that use body content

Custom JSP Tag Libraries: Advanced Topics

  • Tags with dynamic attribute values
  • Tags with complex objects for attributes
  • Manipulating the tag body
  • Looping tags
  • Nested tags
  • Using SAX and TagLibraryValidator to validate tag library syntax

Accessing Databases with JDBC

  • Overview of JDBC technology
  • JDBC drivers
  • Seven basic steps in using JDBC
  • Using JNDI with JDBC
  • Retrieving data from a ResultSet
  • Using prepared and callable statements
  • Handling SQL exceptions
  • Submitting multiple statements as a transaction