Building Web Applications, Servlets, JSP and JDBC
Overview
Java 2 Enterprise Edition (JEE) is a powerful platform for building web applications. The JEE platform offers all the advantages of developing in Java plus a comprehensive suite of server-side technologies. This course tells you what you need to know to design and build your own web applications. You'll learn the details of the key JEE technologies and how to leverage the strengths of each, with special focus on Servlets and JSP. At the same time, you'll be learning about the big picture of JEE and how to design web applications that are robust, efficient, and maintainable. If you want to deliver an application on the web, you'll find this course essential. The course begins with a discussion of web application architecture. A major part of the course is spent on Servlets and JavaServer Pages (JSP) with special focus on using the JSTL. It then covers JDBC, Java’s database access technology. Throughout the course, students will create code for a online store. Students will learn not only specific topics and APIs but also how to fit the pieces together into a complete application. All labs are done using the Tomcat Web Server as the server platform, and the lab instructions include detailed directions on using Tomcat. Labs can be done with the Eclipse IDE or a simple editor.
Audience
Students who can benefit from this course include experienced java programmers who require effective, real-world skill-building in Java Enterprise Edition domain.
Prerequisites
A minimum of 6 months programming experience with the JSE prior to attending this course will be necessary to be successful in understanding the course material.
Course Format
This is a hands-on course. We apply a powerful learning cycle of short lecture, examples and labs on each topic. Each student gets lab code and the entire course content printed out (organized in a ring binder).
Course Duration
Five days (35 hours), 9:00 AM-5:00 PM (1h lunch break); typically ends by 4:00 PM on the last day.
Course Details
1. Web Applications
• Server-Side Programming
• Web Protocols and Web Applications
• Role of Web Servers
• Java Servlets
• Using Tomcat Web server
• Structure of a Java Servlet
2. Servlets Architecture
• Servlets Architecture
• Servlet and HttpServlet
• Request and Response
• Reading Request Parameters
• Producing an HTML Response
• Redirecting the Web Server
• Deployment Descriptors
• Servlets Life Cycle
• Relationship to the Container
3. Interactive Web Applications
• Building an HTML Interface
• HTML Forms
• Handling Form Input
• Application Architecture
• Single-Servlet Model
• Multiple-Servlet Model
• Routing Servlet Model
• Template Parsers
4. Session Management
• Managing Client State
• Sessions • Session Implementations • HttpSession • Session Attributes • Session Events • Invalidating Sessions
• The Need for Configuration
• Initialization Parameters
• Properties Files
• JNDI and the Component Environment
• JDBC Data Sources
• Working with XML Data
6. Filters
• Servlet Filters
• Uses for Filters
• Building a Filter
• Filter Configuration and Context
• Filter Chains
• Deploying Filters
7. Database and SQL Fundamentals
• Relational Databases and SQL
• SQL Versions and Code Portability
• Database, Schema, Tables, Columns and Rows
• DDL - Creating and Managing Database Objects
• DML - Retrieving and Managing Data
• Sequences
• Stored Procedures
• Result Sets and Cursors
• Using SQL Terminals
8. JDBC Fundamentals
• What is the JDBC API?
• JDBC Drivers
• Making a Connection
• Creating and Executing a Statement
• Retrieving Values from a ResultSet
• SQL and Java Datatypes
• SQL NULL Versus Java null
• Creating and Updating Tables
• Handling SQL Exceptions and Proper Cleanup
• Handling SQLWarning
9. Advanced JDBC
• SQL Escape Syntax
• Using Prepared Statements
• Using Callable Statements
• Scrollable Result Sets
• Updatable Result Sets
• Transactions
• Batch Processing
• Alternatives to JDBC
10.Introduction to Row Sets
• Row Sets in GUI and JEE programming
• Advantages of RowSets • RowSet Specializations • Using CachedRowSets 11.JSP Architecture • JSP Containers • Servlet Architecture • Page Translation • Types of JSP Content • Directives • Content Type • Buffering • Scripting Elements • JSP Expressions • Standard Actions
• Custom Actions and JSTL
• Objects and Scopes
• Implicit Objects
• JSP Lifecycle
12.Scripting Elements
• Translation of Template Content
• Scriptlets
• Expressions
• Declarations
• Dos and Don'ts
• Implicit Objects for Scriptlets
• The request Object
• The response Object
• The out Object
13.Interactive JSP Applications
• HTML Forms
• Reading CGI Parameters
• JSPs and Java Classes
• Error Handling
• Session Management
• The Session API
• Cookies and JSP
14.Using JavaBeans
• JSP Actions
• JavaBeans
• Working with Properties
• <jsp:useBean>
• <jsp:getProperty> and <jsp:setProperty>
• Using Form Parameters with Beans
• Objects and Scopes
• Working with Vectors
15.The Expression Language and the JSTL
• Going Scriptless
• The JSP Expression Language
• EL Syntax
• Type Coercio
• Error Handling
• Implicit Objects for EL
• The JSP Standard Tag Library
• Role of JSTL
• The Core Actions
• Using Beans with JSTL
• The Formatting Actions
• Scripts vs. EL/JSTL 16.Advanced JSP Features • Web Components • Forwarding • Inclusion • Passing Parameters
• Custom Tag Libraries
• Tag Library Architecture
• Implementing in Java or JSP
• Threads
• Strategies for Thread Safety
• XML and JSP