Java EE Web Application Development with Apache Struts 1
Duration: 5 days | Price: $2495 | Dates:
Description: This hands-on course provides participants with the knowledge and experience necessary to develop and deploy large, robust and complex Java web applications utilizing the Apache Struts 1 framework. The Apache Software Foundation has provided numerous open-source tools, which set the standard for web application development. These include the Apache web server and the Tomcat Servlet Container. Apache Struts 1 provides a flexible controller layer for JSP-based applications, with significant facilites for validation, internationalization and page layout. Struts is an implementation of the Model-View-Controller (MVC) pattern, a recommended architectural design pattern for interactive applications. The Struts controller is based on standardized technologies including Servlets, JSP Pages, Tag libraries, JavaBeans and XML. Students will learn how to use the Struts framework to write, assemble, configure and deploy complex web applications.
This course covers architectural design issues as well as specific coding models for Java EE components, and is up to date with the latest Java EE 5, JSP 2.1 and Servlet 2.5 specifications. Security, transaction management, inter-component communication and deployment issues are discussed in detail, with hands-on labs to solidify understanding. Since coding and deployment files are standardized by the Jave EE specifications, students may readily apply the skills learned in this class to write code for any compliant server, including Apache Tomcat, JBoss, WebSphere, Oracle, WebLogic and many others. Students will understand the role and architecture of the most important containers in the Java EE specification: the Web Container (which hosts HTML pages, Servlets and JSP Pages) and the EJB Container (which hosts Enterprise JavaBean components). Participants will learn how to use important Java EE services and protocols including JNDI, JDBC and JMS. Students will learn how to utilize ANT, a flexible and powerful XML-based build utility, to compile, deploy and execute stand-alone and enterprise Java applications. Comprehensive hands-on lab exercises reinforce instructor lectures and build direct competence in the topics presented throughout the course.
This course assumes that students possess a thorough knowledge of how to use Servlets, Java Server Pages, Tag Libraries, ANT and JDBC to exploit the services of the Java EE platform.
Prerequisites: Java SE 5 programming experience and an understanding of object-oriented design principles. Fundamental knowledge of XML and HTML is helpful but not required.
Overview of Topics Covered:
Enterprise Application Architecture
Issues in Building Web Applications
Web Development Challenges
Frameworks and Design Patterns
The Model-View-Controller Pattern
Benefits of MVC
Struts and MVC
Struts Core Technologies
The Struts Controller
Struts in Action
The Struts Model
The Struts View
Basic Struts Development Process
Introduction to Struts
Installing Struts
Struts Libraries
Struts Configuration Files
Deploying Resource Bundles
Deploying to Tomcat
Developing the Struts Controller
Registering the Action Servlet
Editing the web.xml File
The struts-config.xml File
Defining Action Mappings and Forwards
Defining an Action Form
Defining Form Properties
Dynamic Action Forms
Developing Struts Actions
Forwarding From an Action
Using Predefined Actions: ForwardAction, IncludeAction, DispatchAction
Developing the Struts View
Using JSP Pages for the View
Using Struts Tag Libraries
Struts HTML tags for Form Layout
Struts Logic Tags
Using JSTL (Java Standard Tag Library)
Internationalization
Understanding Locales
Setting the Struts Locale
Locale-specific Output
Developing Locale-Specific Resource Bundles
Selecting Character Encodings
Using LookupDispatchAction
Developing the Data Model
Decoupling the Model
Developing Business Objects
Accessing JDBC DataSources
Displaying Errors and Messages
Defining Messages
Returning Action Messages
Displaying Error Lists
Input Validation
Struts Features for Validation
Form Validation
Using the Validator Plug-in
Displaying Validator Messages
Enabling AJAX-based Validation
Laying out Pages with Tiles
Building a Tile Layout
Developing a Template
Using The Tiles Plug-In
Defining Tiles in tiles-defs.xml
Extending Tiles Definitions
Forwarding to Tile Definitions
Customizing the Struts Controller
Inside the Struts ActionServlet
Configuring the RequestProcessor
Defining Commands
Dividing an Application into Modules
Logging and Debugging
Introduction to Java EE Web Applications
Server-Side Application Development using Java EE
The Role of Java EE Containers, Components and Services
Using Web-Based Components in Application Design
Structure of Java EE Web Components
Deploying Web Applications
Java EE Web Container Services
Using ANT
Understanding the ANT build file
Designing ANT Targets
Using ANT Standard Tasks
Using ANT Properties
Compiling and Executing Java Applications
Building WAR, EAR and JAR Deployment Files
Introduction to Servlets
Servlet Architecture and advantages
The Role of Servlets in Web Application Design
Servlet Runtime Environment
Servlet Lifecycle
Developing Servlets
Servlet classes and interfaces
Working with Request and Response objects
Processing GET and POST Requests from Web Clients
Retrieving Parameters from HTML Client Forms
Generating Dynamic HTML Responses
Initializing Servlets
Destroying and Freeing Resources in Servlets
Controlling Single and Multi-Threading in a Servlet
Deploying Servlets to a Web Application Server
Building the WAR file
The web.xml descriptor file
Developing JavaServer Pages (JSPs)
Understanding JSP/Servlet Translation
Elements of JSP Syntax
JSP Page Directives
JSP Declarations
Displaying JSP Expressions
Writing Scriptlets
Deploying JSPs
Using JavaBeans in JSPs
JavaBean Architecture
Creating JavaBeans
Using JavaBeans in JSP Pages
XML-format JSP Documents
Deploying and Using Tag Libraries
Motivation for Tag Libraries
Implementing the Model-View-
Controller Pattern
JSP built-in Actions
The JSP Standard Tag Library (JSTL)
Deploying and using Tag Libraries
Writing Tag Handlers
Analyzing Tag Library Descriptor Files
Creating Tag Library Descriptor Tags
Using Tag Handler Methods to
Generate Dynamic Web Content
Handling Tag Attributes and Attribute Validation
Processing Tag Body Content
Working with the TagExtraInfo Class
Developing and Deploying Tag Files
Session Management and Communication Between Web Components
Storing Shared, Scoped Information
Java EE Session Management
Maintaining Sessions via URL Rewriting
Using Cookies
Using Hidden Form Fields to Track Session IDs
Using the HttpSession Interface
Transferring Control via Request Dispatching
Request Redirection
Developing Secure Web Applications
Understanding JAAS Concepts
Java EE Authentication and Authorization
Defining Security Roles
Declaring Security Constraints
Using Programmatic Security
Using Java SE Security Features
Encryption, Message Digests and Keys
Java Naming and Directory Interface (JNDI)
Role of JNDI in the Java EE Architecture
JNDI Service Providers
Importing and Utilizing JNDI Packages
Binding Objects with JNDI
Looking up Objects with JNDI
Using the Environment Naming Context (ENC)
Declaring Resource References
Object Serialization
Purpose of Serialization in the Java EE Framework
Creating Serializable Objects
Reading and Writing SerializableObjects
Controlling Serialization
Advanced Topics - Filters, Listeners and Resource Injection
Using Filters to process Requests and Responses
Controlling the Filter Chain
Writing Filters
Wrapping Requests and Responses
Writing and Deploying Listeners
Using Annotations in Servlet 2.5 Applications
Controlling Resource Injection
Using Special Resource Types
Accessing Databases with JDBC
Understanding the JDBC Connectivity Model
Accessing Data Sources through JNDI
Connecting to a Database
Executing SQL Queries and Updates
Processing Result Sets
Using Scrollable and Sensitive Result Sets
Working with ResultSetMetaData Classes
Utilizing Parameterized Statements
Calling Stored Procedures
Handling SQLExceptions
Controlling Transactions
Using Batch Updates
Using the Java Messaging Service (JMS)
Architecture of JMS
Using Classes and Interfaces in the JMS API
Developing a JMS Producer and Consumer
Introduction to Enterprise JavaBeans
How EJBs are Used
Bean Developer, Bean Deployer and Application Assembler Roles
Session, Entity and Message Driven Beans
EJB Container Services
Deploying Enterprise Java Beans
Creating the EJB Deployment Descriptor
Accessing Enterprise Java Beans
Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.