Class ForwardAction

java.lang.Object
com.zfabrik.util.microweb.actions.ForwardAction
All Implemented Interfaces:
IAction

public class ForwardAction extends Object implements IAction
given a URL of the form [prefix][remainder] we forward to [target][remainder]
  • Constructor Details

    • ForwardAction

      public ForwardAction(String target)
    • ForwardAction

      public ForwardAction(String prefix, String target)
      A forward action may work on a prefix basis. That is, instead of serving exactly one target, it serves a whole namespace. It does so by taking off the context path and the prefix and appends the remainder to the target path (that should, as always, have a leading slash and no trailing slashes).
      Parameters:
      prefix -
      target -
  • Method Details

    • handle

      public OutCome handle(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException
      Specified by:
      handle in interface IAction
      Throws:
      javax.servlet.ServletException
      IOException