private void processPaging(MapHttpServletRequest request) {
        String path = request.getRequestURI();

        int index = path.lastIndexOf("/page/");
        if (index != -1) {
            String url = path.substring(0, index);
            String[] elements = path.substring(index + 6).split("/");

            if (elements.length < 1 || elements.length > 2) {
                return;
            }

            int page = -1;
            int size = -1;

            try {
                page = Integer.parseInt(elements[0]);
                if (elements.length > 1) {
                    size = Integer.parseInt(elements[1]);
                }
            } catch (NumberFormatException ex) {
                // Not correct paging format, maybe it is something else
                return;
            }

            if (page > -1) {
                request.setAttribute(AttributeNames.PAGING, page);
            }

            if (size > -1) {
                request.setAttribute(AttributeNames.PAGING_SIZE, size);
            }

            if (url.equals("")) {
                url = "/";
            }

            path = url;
            request.setRequestURI(path);
        }
    }