1. opensymphony
  2. xwork


xwork / docs / basics.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <title>XWork Documentation</title>
  <link type="text/css" href="main.css" rel="STYLESHEET"/>
  <div id="page-logo">
    <a href="index.html"><img src="logo.png" border="0"/></a>
    <div class="snip-title">
	  <h1 class="snip-name">Xwork Basics
<div id="snip-content" class="snip-content">

 <div class="snip-attachments"></div>
 <h3 class="heading-1">Actions
</h3><p class="paragraph"/>Actions are the basic unit of execution...
<h3 class="heading-1">The Action Interface
</h3><p class="paragraph"/>The basic interface which all XWork actions must implement. Provides several standard return values like SUCCESS and INPUT. Only contains one method, the<p class="paragraph"/><div class="code"><pre><span class="java&#45;keyword">public</span> <span class="java&#45;object">String</span> execute() <span class="java&#45;keyword">throws</span> Exception;</pre></div>
<h3 class="heading-1">ActionSupport
<h3 class="heading-1"><a href="localisation.html">Localization with XWork</a>
<h3 class="heading-1">ActionContext
</h3><p class="paragraph"/>The ActionContext provides access to the execution environment in the form of named objects during an Action invocation. A new ActionContext is created for each invocation allowing developers to access/modify these properties in a thread safe manner. The ActionContext makes a number of properties available that are typically set to appropriate values by the framework. In WebWork 2 for example, the ActionContext session map wraps an underlying HttpSession object. This allows access to environment specific properties without tying the core framework to a specific execution environment.<p class="paragraph"/>The ActionContext is acquired through the static ActionContext.getContext() method. The ActionContext is a thread local variable and thus the properties of the ActionContext will be relative to the current request thread. The ActionContext has several methods for commonly used properties as well as get() and set() methods which can be used for application specific properties. 
<h3 class="heading-1">Lifecycle
<h3 class="heading-1">No FormBeans?
</h3><p class="paragraph"/>Xwork / Webwork does not require the use of FormBeans
like Struts&#8230;