Chapter 4: All About Actions


In this chapter:

  1. You will learn about all the built-in Struts Actions ‚ ForwardAction, IncludeAction, DispatchAction, LookupDispatchAction and SwitchAction

  2. You will learn about multiple sub application support in Struts and using SwitchAction to transparently navigate between them

  3. You will see examples of effectively using the built-in Actions

  4. You will learn of ways to prevent direct JSP access by the users

In Chapter 2, you understood the basics of the Struts framework. In Chapter 3, you applied those basics to build a simple web application using Struts and got a clear picture of the basics. In this chapter we take you beyond the basics as you explore Struts Controller components that are interesting and timesaving that prepare you to handle realistic scenarios.

Action classes are where your presentation logic resides. In Chapter 2, you saw how to write your own Action. Struts 1.1 provides some types of Action out-of-the-box, so you don ‚ t have to build them from the scratch. The Actions provided by Struts are ForwardAction , IncludeAction , DispatchAction , LookupDispatchAction and SwitchAction . All these classes are defined in org.apache.struts.actions package. These built-in actions are very helpful to address some problems faced in day to day programming. Understanding them is the key to using them effectively. All of these the Actions are frequently used, except for IncludeAction .




Struts Survival Guide. Basics to Best Practices
Struts Survival Guide: Basics to Best Practices (J2ee Survival Series)
ISBN: 0974848808
EAN: 2147483647
Year: 2004
Pages: 96

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net