Introduction to Java Struts
- Recommended Duration:
- 3 Days
- Benefits
- JSP and servlet developers learn to create MVC (Model-View Controller) or Model-2 Web applications using the Apache Struts framework. Students first learn the Struts architecture, then build Struts applications using: actions, action mappings, form beans, and request forwarding. The advantages of declarative coding via XML are explored. Finally, students will construct presentations using Struts HTML tags and Tiles.
- Audience
- Java JSP and Servlet developers who will be using the Apache Struts framework.
- Prerequisites
- Java developers with experience creating JSPs and Servlets (or who have completed the "Java Servlet and JSP Programming" course or its equivalent).
- Exercises
- Eleven computer exercises will be conducted to emphasize major course topics. Exercises may be performed using available IDE (Eclipse, IBM RAD, Oracle JDeveloper) or command-line tools. The local test Java EE application server will be used; or an appropriate environment can be created for the course.
- Major Topics
-
- Understanding the MVC (Model View Controller) / Model 2 pattern
- JSP/Servlet review
- Struts Architecture and MVC
- Basic Components of Struts
- Struts vs "native" JSP
- Struts components for Model, View, and Controller
- Struts "flow"
- Mapping action paths and developing screen requirements
- Controller
- Defining "actions"
- Action servlet
- Action mapping
- XML configuration
- web.xml
- struts-config.xml
- Struts API: Action, ActionForm, ActionServlet, ActionForwards, ActionMappings, DynActionForm, and more
- Struts Tag Libraries
- ActionForm
- Using form beans to pass data
- Working with Validator
- Passing control using action mapping and ActionForward
- Internationalization (I18N)
- Configuring and using Tiles
- Introduction to Java Server Faces (JSF)
- Packaging Struts applications
- Configure, test, deploy applications
- Exception handling: ActionError, ActionException, ActionMessage