Skip to main content

Instructor-led training

Fast Track to Jakarta Struts Using Rational Application Developer (RAD) Training in Urbana, Ohio

Struts addresses many major issues in using vanilla Servlets/JSP to build web systems.

What you'll learn

Struts addresses many major issues in using vanilla Servlets/JSP to build web systems. It solves the problem of controller complexity by removing the workflow logic from the Servlets, and directing workflow in an XML configuration file. Struts improves on the limited form support in JSP by adding numerous capabilities to form processing including easy validation, easy error display, and the refilling of form input on form retries from a users previous entries. It minimizes the complexity of JSP pages, by integrating with the JSTL tag library, and additionally supplying a very extensive and flexible set of custom tag libraries for many of the standard operations needed in JSP pages. This course will get you up to speed with Struts in a very short time. It includes all the important concepts, and hands on labs that will have you building working Struts applications in no time flat. In addition, this course covers how to extend the Struts framework to fit your unique needs. All labs are done using the RAD Development Environment, and the lab instructions include detailed directions on using RAD and the RAD wizards and tools.

Private Training for Teams

This course is offered as private, instructor-led training for organizations, onsite in Urbana, Ohio or live online. Dates, delivery format, and course content are arranged around your team's requirements.

This course is not currently scheduled as a public class for individual enrollment.

Request Group Training

Prerequisites

Suitable for programmers with some previous experience in working with Java and Object-Oriented (OO) programming.

Course Outline

Getting started with Struts  
Jakarta Struts Project
MVC and Struts
Review Servlets, JSP and Web Applications
Struts Architecture
 
Your first Struts Application
Configuring Struts applications
Defining views – the input JSP
Defining ActionForms (FormBeans)
Defining Actions
 
Mapping the Model to the View
Review of Custom Tags
Introduction to JSTL (JSP Standard Template Library)
Using the Struts HTML Tags, Struts Bean Tags and Struts Logic Tags
Pre-populating forms from FormBeans
 
Errors and Debugging Struts Applications
Error Handling
Action Error and ActionErrors
ActionForm validate() method
Error Management in Action.execute()
Error display in JSP pages:   tag
Writing all errors to JSP page
Writing selected errors to JSP page
Handling exceptions
Declarative Exception Handling
Logging – A critical tool
Overview of logging
Simple Servlet Logging
Jakarta Commons Logging
Using Commons Logging
Log Message Levels
Apache log4j
Overview, Loggers, Appenders, Layouts, Using log4j
 
Dynamic Forms and the Validator Framework
Dynamic Forms
Issues with Regular Forms
Overview of Dynamic Forms
Configuring Dynamic Forms - The DynaActionForm and Form Properties
Using the Dynamic Form in the Action
The Validator Framework - Overview
Validation Rules
Adding Errors to the Resource Bundle
Using Validators with Dynamic and Static Forms
Important Predefined Validators : Email, mask, range, length, date and credit card validation
Using the Mask Rule
 
Working with the Tiles Custom Library
Issues with Managing JSP Complexity
View Reuse
The Tiles Framework
Defining Layouts for View Reuse
Using tiles:get, tiles:put, tiles:getAsString and tiles:insert
Tiles Definitions
JSP Definitions – Uses, Shortcomings
Using Definitions
XML Definitions
The Tiles Plugin
Tiles Controllers
 
Additional Capabilities
Forward and Include Actions
Setup Actions
DispatchAction
Managing Complexity
Multiple struts config files
Multiple resource bundles

What makes Struts hard to learn

Most of Struts is not Java code. It is declarative wiring: an XML configuration file maps requests to Actions, Actions to ActionForms, and outcomes to JSPs. A typo in a mapping often shows up only at runtime as a blank page or an unexpected forward. The syllabus therefore starts with MVC and the Struts architecture, reviews Servlets, JSP and web applications, and has you build a first application before it covers configuration in detail.

Common misconceptions:

  • The Action is not the whole controller. Workflow lives in the configuration, and Defining Actions and Configuring Struts applications only make sense together.
  • Validation has two homes. You can write an ActionForm validate() method by hand, or use dynamic forms (DynaActionForm) with the Validator framework and its predefined rules (email, mask, range, length, date, credit card). Knowing when to use each, and how messages reach the resource bundle, takes practice.
  • Errors can be handled at several levels: ActionErrors, error handling inside Action.execute(), and declarative exception handling. These are separate mechanisms, and the course treats them separately.

The topics build in layers. First come the form and view basics: the Struts HTML, Bean and Logic tags, JSTL, and pre-populating forms. Error handling and logging (Commons Logging and log4j loggers, appenders and layouts) come next, because you need them to debug the later material. Dynamic forms and the Validator follow, then Tiles for view reuse (layouts, definitions, the Tiles plugin, controllers). The course closes with DispatchAction, setup actions, multiple configuration files and multiple resource bundles, which keep larger applications manageable.

Who it suits and what to take around it

This is an introductory, three-day course for programmers who already have some Java and object-oriented experience. It suits teams that build, maintain or migrate web applications on the Struts framework and want to be productive in the framework and the RAD tooling quickly. Labs use the RAD development environment and its wizards.

Struts builds directly on the servlet model. If your team's request/response, session and JSP fundamentals are shaky, Fast Track to Servlets/JSP Using Rational Application Developer (RAD) covers that ground in the same tooling.

Struts handles the web tier only. For database access behind the Actions, Fast Track to Hibernate 3.x is a natural next step. Teams comparing component-based approaches can look at Fast Track to JavaServer Faces (JSF) Using Rational Application Developer (RAD).

Illustrative scenarios

The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.

  • A long data-entry form. A team might replace hand-written request parsing with an ActionForm or DynaActionForm, apply Validator rules such as mask and range, and redisplay the user's earlier entries with error messages on a retry.
  • Inconsistent page layout. A team maintaining dozens of JSPs that repeat headers and menus might use Tiles layouts and definitions, with tiles:insert and tiles:put, so a layout change is made in one place.
  • Diagnosing a misbehaving workflow. A developer could add Commons Logging backed by log4j to an Action, set message levels, and use declarative exception handling to send failures to a consistent error page instead of a stack trace.

Using AI coding assistants with Struts

AI coding assistants are useful for repetitive artifacts: ActionForm properties, JSP skeletons using the Struts HTML tags, log4j configuration, and first drafts of Validator rules and resource-bundle entries. They can also explain an unfamiliar mapping in an existing configuration file.

They fail in predictable ways for this material:

  • Mixing frameworks. Suggestions may borrow idioms from other Java web frameworks or from different Struts generations, giving classes or tags that do not match your project's libraries.
  • Inconsistent wiring. The Java, the configuration file, the JSP and the message keys must all agree, and generated pieces often do not. The result is a missing form-bean name, an unmapped forward, or an absent error message.
  • Security. Generated JSPs may echo user input unsafely, or validation may exist only on the client side.

To verify the output, compile against the Struts libraries your project actually uses. Exercise every forward, including failures. Submit invalid input to confirm that each validation rule and its message appear. Read the log output at a detailed level to confirm the request path is what you expected.

Frequently asked questions

What level is this course, and what should I know first?

It is introductory. You should have some Java and object-oriented programming experience. The course reviews Servlets, JSP and web applications early on, but it does not teach Java itself.

What does the course cover?

It covers MVC and Struts architecture, configuration, ActionForms and Actions, the Struts HTML, Bean and Logic tags with JSTL, error handling, logging with Commons Logging and log4j, dynamic forms and the Validator framework, Tiles, and DispatchAction and related actions. It also covers managing larger applications with multiple configuration files and resource bundles.

Do the labs use a particular IDE?

Yes. All labs use the RAD development environment, and the lab instructions include directions for its wizards and tools.

Can this be delivered privately for our team, onsite or online?

Yes. HSG delivers private training for organizations, either onsite at your location or live online.

Can the content be customized?

Private training can be customized, including to the technology versions your organization uses. Request a training proposal to discuss your needs.

Training locations

Fast Track to Jakarta Struts Using Rational Application Developer (RAD) training across the U.S. and beyond.

We provide private Fast Track to Jakarta Struts Using Rational Application Developer (RAD) training for organizations, onsite at your location or live online, throughout the United States and internationally.

View all Fast Track to Jakarta Struts Using Rational Application Developer (RAD) training locations

Train your team with HSG

Private, instructor-led training customized for your organization.

  • Onsite or live online delivery
  • Customized curriculum
  • For a single employee or an entire team
  • Flexible scheduling
  • Experienced instructors
Request Group Training

Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com

Ready to train your team?

Let's customize this training for your organization.

Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.