Creating the Action class

Once configuration is completed, Action(s) can be created and deployed in one of the packages specified in the init param action.packages.
The Action must implement the interface JavajaxAction, which has two methods to be implemented:

public RequestContext getContext();
public void setContext(RequestContext context);

These methods are needed by JavAjax to pass the RequestContext object to the Action, which should be stored in an Action variable for later use.
public class UserAction implements JavajaxAction {

    RequestContext context = null;

    public RequestContext getContext() {
        return this.context;

    public void setContext(RequestContext context) {
        this.context = context;

    protected Response browseToHome() {
        return new ForwardResponse("index.jsp");

        params={@Param(value="user" mandatory=true)}
    protected Response editUser(String userId) {
        return new ForwardResponse("userEdit.jsp");