SERVLET AND JSP PROGRAMMING WITH TOMCAT 6 USING ECLIPSE – GTJ17

Course Description

Students will learn to develop and test server-side web applications based on the Java Platform, Enterprise Edition (Java EE) component model using Eclipse tools. Develop and test server-side applications that use Servlets and JavaServer Pages (JSPs) for the control and flow of e-business applications.

Topics

Develop and test Servlets
Develop and test JavaServer Pages (JSPs)
Develop and test Java EE applications following the Model/View/Controller architecture
Integrate business logic using Java Beans and Java Database Connectivity (JDBC)
Apply best practices to Servlet and JSP development

Objectives

After completing this course, the student should be able to:

  • Use Eclipse as a truly, integrated development environment
  • Build Servlets according to the current Servlet 2.5 specification
  • Build JSPs according to the current JSP 2.1 specification
  • Build custom JSP tag libraries
  • Integrate Servlets and JSPs into a complete Java EE application
  • Test Servlets and JSPs using Eclipse

^^

Duration

4 days

^^

Target Audience

Java programmers who build server-side web applications interested in leveraging Eclipse to streamline their development cycle.

^^

Course Prerequisites

You should understand essential concepts of Object-Oriented Programming and be able to write simple Java programs with assistance. The following course satisfies this requirement:

GTJ01 – Introduction to Java Using Eclipse

^^

Suggested Follow on Courses

There are a number of options of suitable follow-on courses, depending on your business needs. Please, contact us for further information.

^^

Course Content

1 . JAVA ENTERPRISE EDITION (EE) OVERVIEW

  1. Introduction to Java Platform
  2. Java Community Process (JCP)
  3. Introduction to Java EE
  4. Why Move to Java EE
  5. Java EE – New and Enhanced Features
  6. Java EE Software Packaging
  7. Java EE Technologies

2. SERVLET BASICS

  1. History CGI
  2. Server Extension APIs
  3. Java Servlet
  4. New In Servlet 2.5
  5. Servlet Container
  6. Servlet Responsibilities
  7. J2EE and Servlet
  8. The Servlet Class
  9. The HttpServlet Class
  10. An Example Hello World
  11. The Servlet Container
  12. The Servlet API
  13. Life Cycle Initialization
  14. Example Initialization
  15. Life Cycle Processing
  16. Life Cycle Destroy
  17. User Input
  18. Example User Input
  19. Output to Client
  20. Servlet Error Handling
  21. Threading Issues

3. SERVLET INTERATION INTERFACE

  1. Request
  2. Request Parameters
  3. Request Attributes
  4. Request Headers
  5. Request Path
  6. Other Request Information
  7. Response
  8. Cookies
  9. Components of a Cookie
  10. Issuing Cookies
  11. Retrieving Cookies
  12. Deleting a Cookie
  13. Servlet Context
  14. Servlet Context Attributes
  15. Resource
  16. Session Tracking
  17. Tracking Techniques
  18. Cookies
  19. Cookies an Example
  20. HTML Hidden Fields
  21. Using HttpSession
  22. Session Invalidation
  23. An Example of Session Tracking Code…
  24. HttpSession – URL Rewriting

4. JAVA SERVER PAGE (JSP) BASICS

  1. JavaServer Pages
  2. JavaServer Pages 2.1
  3. A Simple Example – Hello.jsp
  4. JSP Benefits
  5. Evolution of Dynamic Content Technologies
  6. How JSP Works
  7. JSP Invocation
  8. JSP Scripting Elements
  9. The XML Syntax
  10. JSP Directive
  11. page Directive Attributes
  12. page Directive an Example
  13. page Attribute errorPage
  14. page Attribute isErrorPage
  15. Using XML Syntax
  16. Directives include
  17. Include an Example
  18. Include at compile time vs. at request time
  19. Request time inclusion
  20. JSP Declarations
  21. Declarations an Example
  22. JSP Expressions
  23. JSP Expressions an Example
  24. JSP Scriptlets
  25. JSP Scriptlets an Example
  26. JSP Comments
  27. JSP Predefined Variables
  28. The request Object
  29. The response Object
  30. The out Object
  31. Out an Example

5. USING JAVA BEANS WITH JSP

  1. What is a JavaBean?
  2. Structure of a JavaBean
  3. Life Cycle
  4. Properties
  5. Very Simple Bean
  6. Using Java Beans in JSP
  7. The <jsp:useBean> tag
  8. Java Bean scope
  9. <jsp:useBean> in Action
  10. The <jsp:getProperty> tag
  11. Mapping all the request parameters
  12. Another Example
  13. Mixing Scriptlets and Bean tags

6 . MODEL/ VIEW/ CONTROLLER PATTERN

  1. Key Issues for Web Application Development Productivity
  2. Web Application Programming Model MVC
  3. Model
  4. View
  5. Controller
  6. JavaBeans
  7. MVC Implementation
  8. Request Dispatching
  9. Request Dispatching – Forward vs. Include
  10. Request Dispatching – forward Request to JSP
  11. HTTP Redirection
  12. Dispatch vs. redirection
  13. Redirecting to a JSP
  14. Supply Result Information to the JSP
  15. A Simple Example
  16. Display JavaBean Properties in JSP

7. WORKING WITH DATABASES

  1. What is JDBC?
  2. JDBC Architecture
  3. JDBC: Basic Steps
  4. Loading a Driver
  5. DB2 UDB JDBC Drivers
  6. Oracle JDBC Drivers
  7. Create a Connection
  8. Connection
  9. Statement
  10. PreparedStatement
  11. Advantages of Prepare Statement
  12. ResultSet
  13. Example JDBC Servlet With Transactions
  14. Close the Connection
  15. Need for Connection Pooling
  16. Connection Pooling in JDBC 2.0
  17. Connection Pooling
  18. Basic Steps in Using JDBC Connection Pooling
  19. Access a DataSource
  20. Get a Connection
  21. Release Connections
  22. Connection Pool Example
  23. Resource References

8. JSP EXPRESSION LANDGUAGE AND STANDARD TAG LIBRARY

  1. JSP Expression Language (EL)
  2. Basic Usage
  3. Unified Expression Language
  4. Built-in Objects
  5. Working With Arrays and Maps
  6. Operators
  7. Full Example
  8. JSP Standard Tag Library (JSTL)
  9. Run Time Version
  10. Basic Tags
  11. Condition Tags
  12. Iterator Tags
  13. Internationalization (I18N)
  14. Setting Preferred Locale
  15. Specifying Resource Bundle
  16. Display Translated Text
  17. Display Number
  18. Display Date
  19. JDBC Tags
  20. Specify Data Source
  21. Performing a Query
  22. Display Result
  23. Pagination Example
  24. Function Tags
  25. Function Syntax
  26. fn Functions

9. SERVLET FILTERS

  1. What is a filter?
  2. Why use a filter?
  3. Uses for Filtering
  4. Features of filters
  5. The Filter interface
  6. How a filter works
  7. In what order?
  8. A Simple Logging Filter
  9. Configuring the filter
  10. Mapping the filter
  11. The Web Deployment Descriptor
  12. Common filter tasks
  13. Request and Response Wrappers

10. SERVLET EVENT LISTENER

  1. What are Listeners
  2. Types of Listeners
  3. Writing a Servlet Context Listener
  4. Writing a Servlet Context Attribute Listener
  5. Writing a Session Activation Listener
  6. Writing a Session Attribute Listener
  7. Registering Listeners
  8. Lifecycle of Listeners

11. JSP CUSTOM TAG DEVELOPMENT

  1. What is Custom Tag?
  2. Why Develop Custom Tags?
  3. The Nature of a Custom Tag
  4. Tag Body
  5. Fragment Attribute
  6. Dynamic Attributes
  7. Tag Library Descriptor (TLD)
  8. Tag Implementation Options
  9. The Simple Tag API
  10. Example Tag Class
  11. Life Cycle of a Simple Tag
  12. The JspContext Object
  13. Dealing With the Body
  14. Implementing an Iteration Tag
  15. Accessing a Parent Tag
  16. Working With Fragment Attributes
  17. The TLD File
  18. Defining a Tag
  19. Defining a Tag
  20. Packaging a Tag Library
  21. Using a Tag Library
  22. The Tag File Approach
  23. Example Tag File
  24. The Tag Directive
  25. Defining Attributes
  26. Working With Variables
  27. Working With Fragment Attributes
  28. Packaging Tag Files
  29. Creating the TLD File
  30. Using a Tag File From a JSP

12. INTRODUCTION TO JAVA SERVER FACES

  1. What is JavaServer Faces (JSF)?
  2. Why Use JSF?
  3. Nature of a JSF Application
  4. The Sun Reference Implementation (RI)
  5. JSF and MVC
  6. Faces Servlet
  7. Managed Bean
  8. The View
  9. A Simple JSF Application
  10. The Input Form: form.jsp
  11. The Result: thanks.jsp
  12. The Controller: AddressBean
  13. Page Flow or Navigation Rule
  14. How Does the Application Work?
  15. Under the Covers: The Rendered Form HTML
  16. Under the Covers: The Layout Tree

13 . MANAGED BEAN

  1. What is a Managed Bean?
  2. Why Do You Need Managed Beans?
  3. Managed Bean As a Controller
  4. Registering a Managed Bean
  5. Lifecycle of a Managed Bean
  6. Initializing a Managed Bean
  7. What Scope to Use?
  8. Value Binding
  9. Value Binding
  10. Property Data Conversion
  11. Advanced Property Types
  12. Component Binding
  13. Other Binding Types
  14. Basic Input Processing
  15. Advanced Input Processing
  16. JSF Expression Language
  17. Language Basics
  18. Use of Expression in JSF
  19. Basic Expression
  20. Property Access Expression
  21. Map Access Expression
  22. Complex Access Expression
  23. Predefined Objects
  24. Operators

^^

See more Java courses