public Object match(PathPattern<ServletAction> pattern, PathInput input, MapHttpServletRequest request) {
        if (type == Type.DEPLOY) {
            try {
                Page page = pageClass.newInstance();
                input.bind(page);
                pattern.match(input);
                request.setAttribute(AttributeNames.EXTRA_PATH, input.getRemaining());
                return page;
            } catch (Exception ex) {
                throw new PatternException("Exception during invocation of page `" + pageClass + "`", ex);
            }
        } else {
            input.bind(request.getMutableMap());
            pattern.match(input);
            request.setAttribute(AttributeNames.EXTRA_PATH, input.getRemaining());

            return this;
        }
    }