public static void saveRequest(ServletRequest request) {
        Subject subject = SecurityUtils.getSubject();
        Session session = subject.getSession();
        HttpServletRequest httpRequest = toHttp(request);
        SavedRequest savedRequest = new SavedRequest(httpRequest);
        session.setAttribute(SAVED_REQUEST_KEY, savedRequest);
    }
Convenience method that returns a request parameter value, first running it through
{@link StringUtils#clean(String)}.

@param request   the servlet request.
@param paramName the parameter name.
@return the clean param value, or null if the param does not exist or is empty.
web/src/main/java/org/apache/shiro/web/util/WebUtils.java