public static String getRequestScheme(HttpServletRequest req) {
        String scheme;
        if (req.getScheme() != null)
            scheme = req.getScheme().toUpperCase();
        else
            scheme = AuditEvent.REASON_TYPE_HTTP;
        return scheme;
    }
public static String getRequestScheme ( HttpServletRequest req ) { String scheme ; if ( req . getScheme ( ) != null ) scheme = req . getScheme ( ) . toUpperCase ( ) ; else scheme = AuditEvent . REASON_TYPE_HTTP ; return scheme ; }
Get the scheme from the request - generally "HTTP" or HTTPS"

@param req
@return the scheme