getStringParameter method

public static String getStringParameter(HttpServletRequest request,
            String name, String defaultValue) {
        String value = request.getParameter(name);

        if (value != null && "get".equalsIgnoreCase(request.getMethod())) {
            try {
                value = URLDecoder.decode(
                        new String(value.getBytes("ISO-8859-1"), request
                                .getCharacterEncoding()), request
                                .getCharacterEncoding());
            } catch (Throwable t) {
            }
        }
        if (value == null) {
            value = defaultValue;
        }
        return value;
    }

你可能感兴趣的:(parameter)