Escolar Documentos
Profissional Documentos
Cultura Documentos
J2EE Applications
Course No. 3492
Description This course introduces the developer to the Struts architecture and provides the basis for planning, developing,
and deploying Web based applications using the Struts framework. Upon completion of this class, the developer
will be able to quickly construct dynamic server-side web pages using Struts. It includes all the important concepts,
and hands on labs that will enable you to build working Struts.
Audience Experienced Java Developers who want to learn how to use J2EE components to build enterprise web applications.
Prerequisites Students should have six months prior Java development experience, including some experience using Server
Side technologies (Servlets/JSPs) Students should be comfortable creating a servlet and JSP. Or students can be
participating in our focused training curriculum.
Objectives Struts is an advanced Model-View-Controller (MVC) framework for building Servlet/JSP based web applications.
It is an open source framework built as part of the Jakarta project (the makers of Tomcat) that leverages the
capabilities of Servlets/JSP and custom tags to make it easier to use these technologies on large or complex web
systems.
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 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.
Australia | Canada | China | France | India | New Zealand | Singapore | Switzerland | UAE | UK | USA www.keane.com/education/
info@keane.com
Major Topics • Servlets/JSP Review
• Struts Architecture: Model View Controller
• Struts – Overview
• Configuration
• Struts Components: The Action Class
• ActionForms and FormBeans
• Struts Components: ActionForwards
• Struts Tags
• I18N and Struts
• DynaActionForms
• Struts Components: Validator
• Tiles
Duration 5 days
Australia | Canada | China | France | India | New Zealand | Singapore | Switzerland | UAE | UK | USA www.keane.com/education/
info@keane.com
Course Contents
Australia | Canada | China | France | India | New Zealand | Singapore | Switzerland | UAE | UK | USA www.keane.com/education/
info@keane.com
o Code Snippet 6. ActionForms and FormBeans
• ActionForm • Objectives
• ActionForward • ActionForms and FormBeans
• Global Forwards o Whats the difference?
• ActionError o Role – Data Carrier
• ActionMessage o Autopopulation
• ActionErrors o Simple Example
• Summary • Data types
• Objectives • ActionForms
• Configuring web.xml for Struts o What If reset() Is Not Defined for a Property?
• struts-config.xml o validate( )
Australia | Canada | China | France | India | New Zealand | Singapore | Switzerland | UAE | UK | USA www.keane.com/education/
info@keane.com
8. Struts Tags o formatKey Example
• Objectives • <html:tags>
• Tags in JSP • html img and image tags
• Struts custom tags • <html:errors> and <html:messages>
• Taglib directive • Summary
• Struts HTML tags 10. DynaActionForms
• Struts <html:form> tag • Objectives
• <html:text> and <html:password> • ActionForms - Reminder of Struts Data Container
• Struts <html:select> tag • Issue with ActionForms
• <html:options> • DynaActionForm to the Rescue
• <html:link> • What About reset()?
• <html:errors> • What about validate()?
• Struts Bean Tags • DynaActionForms
• <bean:define> o Recap Using
• <bean:cookie> o Recap configuring
• <bean:header> & <bean:parameter> • DynaActionForms Recap Using
• <bean:message>
11. Struts Components: Validator
o Arguments
• Objectives
• <bean:write>
• Validation Overview
• Struts Logic Tags
• Validation “Under the Hood”
• <logic:iterate>
• Components of Struts Validator
• <logic:match>
• Predefined Validators
• Other Logic Branching Tags
• Default Messages for Predefined Validators
• <logic:redirect>
• Using Validators in a Struts Application
• Summary
• Configuring the Validator Plugin
9. I18N and Struts • Creating the Form Class
• Objectives • Creating a Dynamic Validator Form Bean
• I18N • Defining Field Validation in validation.xml
• Localization • The <field> Element in validation.xml
• Elements to Consider • Enabling Client-Side Validation
• Java Support for Localization • Using Masks
• Locale Review • Field Validation Examples
• ResourceBundle Review • Final Steps in Validation
• Example Properties • Validator Tips and Tricks
• Word Order and Substitutions • Summary
• MessageFormat
• I18N and Struts
• Locale in Struts
• Cached Locale Object
• Configuring MessageResources
• Locale aware tags:
• <bean:message> tag
• <bean:write> tag
Australia | Canada | China | France | India | New Zealand | Singapore | Switzerland | UAE | UK | USA www.keane.com/education/
info@keane.com
12. Tiles
• Objectives
• Tiles Overview
• Tiles Example Website
• Implementing Tiles
• Putting it all together
• Steps to use Tiles
• Tiles Plug-in Overview
• Tile Definitions
o Overview
o Creating a Tile Definition in XML
o Example tile definitions
o Tile definitions via custom tags
o Example JSP using a layout
defined in “definitions.jsp”
• Layouts
o Overview
o Example
• Steps to use Tiles - Creating Content
JSPs (creating the Tiles)
• Use the Tiles Definitions
o Overview
o Inserting the Definition
o Passing a Value in a Body
• Extending Tile Definitions - “Inheritence” for Tiles
• Tile Scope Overview
• Tile Scope <tiles:useAttribute>
• Summary
Australia | Canada | China | France | India | New Zealand | Singapore | Switzerland | UAE | UK | USA www.keane.com/education/
info@keane.com