| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 获取Boolean参数
|
| | | */
|
| | | public static Boolean getParameterToBool(String name)
|
| | | {
|
| | | return Convert.toBool(getRequest().getParameter(name));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取Boolean参数
|
| | | */
|
| | | public static Boolean getParameterToBool(String name, Boolean defaultValue)
|
| | | {
|
| | | return Convert.toBool(getRequest().getParameter(name), defaultValue);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取request
|
| | | */
|
| | | public static HttpServletRequest getRequest()
|
| | |
| | | {
|
| | | return null;
|
| | | }
|
| | | }
|
| | |
|
| | | public static String getHeader(HttpServletRequest request, String name)
|
| | | {
|
| | | String value = request.getHeader(name);
|
| | | if (StringUtils.isEmpty(value))
|
| | | {
|
| | | return StringUtils.EMPTY;
|
| | | }
|
| | | return urlDecode(value);
|
| | | }
|
| | |
|
| | | public static Map<String, String> getHeaders(HttpServletRequest request)
|
| | |
| | | }
|
| | | catch (UnsupportedEncodingException e)
|
| | | {
|
| | | return "";
|
| | | return StringUtils.EMPTY;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | catch (UnsupportedEncodingException e)
|
| | | {
|
| | | return "";
|
| | | return StringUtils.EMPTY;
|
| | | }
|
| | | }
|
| | |
|