code: public void service(HttpServletRequest req, HttpServletResponse res) 
          throws ServletException, IOException
      {
          String regex = this.getProperty(REGEX);
          String server = req.getServerName();
          if (regex != null)
          	if (server != null)
          {
          	String match = null;
          	if (regex.indexOf('/') != -1)
          	{
          	    match = regex.substring(regex.indexOf('/'));
          	    regex = regex.substring(0, regex.indexOf('/'));
          	}
          	if (server.matches(regex))
  	        {
          		String target = this.getProperty(REGEX_TARGET);
          		if (target != null)
          		{
          	        if (logger != null)
          	        	logger.info("Redirect " + server + " to " + target);
                      String requestPath = req.getServletPath();
          	        if ((match == null) || (requestPath.matches(match)))
          	        	res.sendRedirect(target);
          	        else
          	        {
          	            boolean fileFound = sendResourceFile(req, res);
          	            if (!fileFound)
          	                res.sendError(HttpServletResponse.SC_NOT_FOUND, "File not found");
          	        }
                      return;
          		}
  	        }
          }
      	super.service(req, res);
      }
docs: process an HTML get or post.
  @exception ServletException From inherited class.
  @exception IOException From inherited class.