Advanced Java Web Developer
Who Needs to Attend
Developers who have experience working with Java and J2EE who want to learn advanced skills, XML support, and how to develop Web Services using Java.
Prerequisites
- Java Web Developer (1890)
- Prior programming experience in at least one object-oriented language such as a .NET language (e.g., C#, VB.NET), Java, C++, or SmallTalk, or significant programming experience in a modern language such as MS Visual Basic.
Follow-On Courses
In this course, you will learn to work with web containers in J2EE to develop servlets, Java Server Pages, and Web Services. In the first three days, you will learn to develop servlets from scratch as well as advanced techniques with Java Server Pages (JSP). The course covers servlet life cycle, JDBC, XML, EL, and more. The second half of the course covers XML and Web Services. Web Services technology, at the heart of Service-Oriented Architecture (SOA), enables programming objects written in multiple languages on diverse platforms to seamlessly communicate with each other. Learn to leverage the most recent XML and SOAP support in the Java framework to create powerful, reusable Web Services.
Certification
Students who successfully complete the class exercises and/or project will receive the WestLake Certification along with real-world sample code.
What You'll Learn
- Details of the Java Servlet API
- Advanced techniques with JSP applications
- Techniques for session management
- Build and deploy Web applications
- Advanced techniques to work with databases using JDBC
- Combine servlets, JSP, and JDBC into complex applications
- Leverage the XML support in the Java framework
- SOAP and WSDL and how the Java framework supports these standards
- Java Annotations in Web Services
- Use the JAX-RPC and JAX-WS libraries
- Build, test, and consume XML Web Services
- Work with document-based services using Java support for XML
- Create Web Service clients on multiple platforms and environments
Course Outline
1. Introduction to Server-Side Java
- Why Use Java on the Server?
- Java and the World Wide Web
- Java Servlets: Dynamic Server Content
- JavaServer Pages (JSP): Dynamic XML Templates
- Java Database Connectivity (JDBC)
- The J2EE Architecture
- Servlets and JSPs in the J2EE Architecture
- EJBs and JDBC in the J2EE Architecture
2. Introduction to HTTP Servlets
- What is an HTTP Servlet?
- How Servlets Work
- Two Servlet Packages
- The Generic Servlet API
- The Servlet Development Process
- Developing an HTTPServlet
- The Deployment Descriptor, web.xml
- The Java Servlet Lifecycle
- doGet() and the HttpServletRequest and HttpServletResponse Objects
- Outputting an HTML Response
- Servlet Initialization
- Using Initialization Parameters
- The Servlet Thread Model
- Logging With Servlets
3. Servlet Request and Response Objects
- Retrieving Client Information
- Redirecting Client Requests
- Retrieving Environment Variables
4. Processing Form Input with Servlets
- The getParameter() Method
- Handling GET and POST Submissions via the Same Servlet
- Processing Form Input with Multiple Parameters
5. Servlet Forwards and Includes
- The RequestDispatcher Interface
- Traditional HTML Includes
- Servlet Includes
6. Using Cookies with Servlets
- Setting a Cookie
- Retrieving a Cookie Value
- Clearing Cookies
7. Session Variables
- Getting a Session Object
- Setting a Session Value
- Getting a Session Value
- The Session ID
- Clearing the Session
8. Introduction to JavaServer Pages
- Overview of JSP
- A JSP Web Deployment Descriptor
- JSP Directives
- JSP Expressions
- JSP Declarations
- JSP Scriptlets
- Implicit Objects
- Session Management with JSP
9. Form Processing with JavaServer Pages
- The Request Object
- Form Processing in One Page
- Handling Multiple Form Parameters
10. JSP Forwards and Includes
- The <jsp:forward> Action
- Conditional Forwarding
- A Preprocessed Include
- Dynamic Includes Using <jsp:include>
11. Exception Handling with JavaServer Pages
- Creating an Error Page
- Linking to an Error Page
- Handling Standard HTTP Errors
12. Introducing JavaBeans
- What are JavaBeans?
- What Distinguishes JavaBeans from Java Classes?
- Examining our First Bean
- Serializable and Star Trek
- Motivation
- No Argument Constructor
- Getting and Setting Properties
- Boolean Properties
- The <jsp:useBean> Tag
- Working with Session Scope
- The <jsp:getProperty> Action
- The <jsp:setProperty> Action
- Matching Form Parameters to Properties
- Matching All the Parameters to Properties
- Initializing Components Using <jsp:setProperty>
13. Introducing JDBC
- About the Database for this Class
- The Seven Steps Carried Out by Database-Driven Applications
- Importing the java.sql Package and Setting the Error Page
- Loading the Database Driver
- Connecting to the Database
- Assemble the SQL Statement
- Execute the SQL Statement
- Close the Connection
- Exceptions using JDBC
- Mapping SQL Data Types to Java
- Keeping the Connection Open
- The _jspInit() Method
14. Intermediate JDBC
- Inserting Data into the Database
- Removing Data from a Table
- Updating a Record
- Working with a PreparedStatement
- The PreparedStatement Mutator Methods
- Working with a CallableStatement
- The Types Class and Setting Parameters
- Executing a CallableStatement
- ResultSet MetaData
- Database MetaData
15. JDBC Driven JavaBeans Components
- The Transient Keyword
16. Dynamic Result Sets
- Why Dynamic Result Sets?
- Defining the Result Set Type
- Updating a Record via the ResultSet
- Moving Around the ResultSet
- Adding New Data to a ResultSet
- Deleting Data via a ResultSet
- Seeing Updated Data
17. Batch Updates
- Batching 101
- Adding to the Batch
- Executing the Batch
18. Transactions with JDBC
- Why Have Transactions?
- Isolation Levels
- Transactional JDBC Methods
- What About Rolling Back?
19. The Java Standard Tag Library
- The JSTL Tag Libraries
- The JSTL Expression Language (EL)
- Analysis of the Expression Language
- Dot Operator Usage to Access Map and Property Values
- The [] operatorThe Deployment Descriptor
- The taglib Declaration
- The Core Tag Library
- The EL Tags
- The <c:set> Tag
- The <c:forEach> Tag
- The <c:out> Tag
- Conditional Tags
- Including Content
- Redirecting Requests
- SQL Tags
- Importing the SQL Tag Library
- Defining the Data Source
- Executing the Query
- The Result Object
- Parameterized Queries
- The Implicit Objects
20. Fundamentals of Web Services Using J2EE - Introduction to Integrating JavaServer Pages and XML
- Goals of the Course
- Software Used for the Course
- Server Setup
21. XSLT
- Example: Transforming XML via the Jakarta xtags Tag Library
- Apache's Jakarta xtags and dom4J
- Exercise: Using the Jakarta xtags Tag Library to Transform XML to HTML
- If You are Done Early
- A Possible Solution to the Exercise
- Example: Using the Java Transformer
- Exercise: Using Xalan to Transform XML to HTML
- If You are Done Early
- A Possible Solution to the Exercise
- Example: Generating XSLT Output to a File
- Exercise: Saving XSLT Output to a File
- If You are Done Early
- A Possible Solution to the Exercise
- Example: XSL Parameters
- Exercise: XSLT with an XSL Parameter
- If You are Done Early
- A Possible Solution to Exercise 4
22. Working with the DOM (Document Object Model)
- What is the DOM?
- What Role Do Parsers Play with the DOM?
- Example: Building a DOM Tree and Outputting it as HTML
- Finding the XML File to Read
- Creating the DOMParser
- The DOM Document Class
- Getting a Reference to the Root Node
- The NodeTree(Node currentnode) Method
- Methods of the Node Class
- Processing Text Nodes
- Processing Standard Nodes and their Child Nodes
- Returning Output
- Disadvantages of the DOM
- Exercise: Generating HTML Output from a DOM Tree
- If You are Done Early
- A Possible Solution to the Exercise
23. Generating HTML Tables from DOM Data
- Retrieving Tags by Name
- Generating the Column Headers
- Generating the Table Rows
24. Searching the DOM Tree
- Example: Searching using Regular Expressions
- Example Searching Using XPath
- Exercise: Searching an XML File Containing Course Data
- If You are Done Early
- A Possible Solution to the Exercise
25. Modifying XML Documents via the DOM
- Example: Adding a Menu Item
- Creating a New Element and Adding it to the Tree
- Saving XML Data to File
- Exercise: Modifying a DOM Tree and Saving It to File
- If You are Done Early
- A Possible Solution to the Exercise
26. Using the DOM and JDBC to Import XML Data into a Database
- Example: Validating and Entering (Generating SQL) XML into a Database
- com.westlake.courses.jsx.DbUtils.clearTable(String dsn, String tablename)
- insertXMLToDB(String dsn, String tablename, String dir)
- insertFood(String name, String price, String description, String calories, String dsn, String table)
- com.westlake.courses.jsx.DbUtils.showRecords(String dsn, String table)
- Exercise: Saving XML Data to a Database
- If You are Done Early
- A Possible Solution to the Exercise
27. Creating XML from Database Data
- Example: Building an XML Document from Scratch with Database Data
- Building a DOM Document from Scratch
- Saving DOM Nodes to a File
- Changing Output Properties
- Exercise: Converting Database Data to an XML File
- If You are Done Early
- A Possible Solution to Exercise 10
28. Introducing SAX
- What is SAX ?
- Example: Parsing a Document Using SAX
- Using SAX to Parse XML
- Creating a File URL
- Getting a Parser
- Specifying a ContentHandler
- Specifying an ErrorHandler
- Parsing the Document
- Displaying Output and Errors
- A SAX ContentHandler
- Creating a ContentHandler: Implement or Extend
- The Five Most Important ContentHandler Methods
- Other Methods Specified by ContentHandler
- Examining an Implementation of ErrorHandler
- A Word about Creating Classes in a JSP
- Exercise: Parsing an XML Document and Generating HTML Output with SAX
- If You are Done Early
- A Possible Solution to the Exercise
29. Importing XML Data into a Database via SAX and JDBC
- Example: Inserting Rows Using SAX
- InsertDemoContentHandler
- startDocument()
- endDocument()
- characters()
- endElement()
- Exercise: Inserting XML into a Database
- If You are Done Early
- A Possible Solution to the Exercise
30. Searching with SAX
- Example: Searching a Document Using SAX
- Exercise: Searching with SAX
- If You are Done Early
- A Possible Solution to the Exercise
31. Examining an Existing Web Service
- References
- Articles
- See Also
- Example: Calling the Google Search Web Service
- Exercise: Call Google Spell Suggest Web Service
- If You are Done Early
- A Possible Solution to the Exercise
32. Creating a Web Service
- References
- Example: Creating a Sample Web Service
- Review the Services WSDL File
- Review the Service Schema File
- Example: A Currency Converter Web Service
- Annotations: Changing the NameSpace and Parameter Names
- Exercise: Creating a Body Mass Index Calculator Web Service
- If You are Done Early
- A Possible Solution to the Exercise
33. Consuming the Web Service
- References
- Example: Consuming the Sample Web Service
- Calling the Service
- Example: Consuming the Currency Converter in Web Application
- Updating the Reference
- Debugging
- Exercise: Consuming the Body Mass Index Calculator Service
- If You are Done Early
- A Possible Solution to the Exercise
34. SOAP Data Types in Java
- References
- Example: Data Types Returned
- Example: Data Types from .NET
35. XML Documents for Data
- Web Service or a Service on the Web?
- Example: Yahoo's Weather "Service"
- Example: XML Over HTTP
- Exercise: Searching Client Data
- If You are Done Early
- A Possible Solution to the Exercise
- Example: A Simple Hello Using JAX-WS and REST
- Articles
- Exercise: Searching Client Data II
- If You are Done Early
- A Possible Solution to the Exercise
- Final Note: XML-Over-HTTP, REST vs. SOAP
36. Positioning with Layers
- Module Objectives
- Designing with Layers in Dreamweaver 8
- Converting Layers to Tables
- Test Your Knowledge
- Module Review
37. XML Data on the Client
- Example: Outputting Data from the Hello REST Service
- Exercise: An Interface on our Client Data Search
- If You are Done Early
- A Possible Solution to the Exercise
38. HTTP URL Connection to Exchange More Data
- Example: Posting Data
- Example: Sending XML Data in the Request to a Servlet
- Example: Sending XML Data in the Request to a Provider
- Exercise: Updating Client Info With XML Data
- If You are Done Early
- A Possible Solution to the Exercise
Classroom Dates and Locations
| Date |
Location Details |
|
| Oct 18 - 22, 2010 | Washington, DC | Register |
Don’t see the location or date you need? No problem – just use our By Request service.
Course Code: 1805
Registration Information
$2000 USD
5 Day Course

