Class ActionMgr

  extended by fc.web.servlet.ActionMgr

public abstract class ActionMgr
extends Object

Manages various Action available to a servlet. Subclasses should add and manage appropriate actions.

Method Summary
 void addAction(Action action)
          Registers an action.
 void handleWebRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Handles a request from a web client.
 String toString()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Method Detail


public final void addAction(Action action)
Registers an action. Action names are case insensitive.


public void handleWebRequest(javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res)
                      throws Exception
Handles a request from a web client. Expects certain parameters to be present in the specified HttpServletRequest. The main parameter needed by this method is:
  • Param name:act
    Param value: A case-insenstive class name of the Action class that will be invoked (for example: "showdir"). Case is not important but using all lower case names will save a few machine cycles. This should match the name with which a particular action object was constructed.
Various actions expect action-specific parameters via the request object parameter. This parameters can be set programatically or via the web client and optionally, actions can also return results via setting them in the request object. The documentation for each action method should give more detail.

Exception - if the action parameter is missing or not understood


public String toString()
toString in class Object