类 Common
java.lang.Object
com.sh.javax.util.Common
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static StringgetRequestParamStr(jakarta.servlet.http.HttpServletRequest request, String[] eliminateParms) 重建URL的参数字符串,根据request对象值,重新构建URL,其中可以排除部分参数 重新构建的参数字符串的最后一个字符串,这个结束符可以去掉static StringgetRequestURL(jakarta.servlet.http.HttpServletRequest request, String[] eliminateParms) 重载public static String getRequestURL(HttpServletRequest request, String[] eliminateParms,boolean delEndTag) 相当于getRequestURL(request,eliminateParms,false),不删除重构的URL中的末字符static StringgetRequestURL(jakarta.servlet.http.HttpServletRequest request, String[] eliminateParms, boolean delEndTag) 重建URL,根据request对象值,重新构建URL,其中可以排除部分参数 重新构建的URL的最后一个字符串要么是?static booleanisContainStr(String[] array, String str) 重载public static boolean isContainStr(String array[],String str,boolean ignoreCase) 相当于isContainStr(array,str,false),不区分大小写进行比较static booleanisContainStr(String[] array, String str, boolean ignoreCase) 判断某一个字符串是否存在于String数组之中static voidrequestConvertISOTOGBK(jakarta.servlet.http.HttpServletRequest request)
-
构造器详细资料
-
Common
public Common()
-
-
方法详细资料
-
getRequestURL
public static String getRequestURL(jakarta.servlet.http.HttpServletRequest request, String[] eliminateParms, boolean delEndTag) 重建URL,根据request对象值,重新构建URL,其中可以排除部分参数 重新构建的URL的最后一个字符串要么是?(不带参数),要么是&(带参数),这个结束符可以去掉- 参数:
request- 请求对象eliminateParms- request中排除的参数列表delEndTag- 删除结束符,结束符是?或者&- 返回:
- 重新构建的URL
-
getRequestURL
public static String getRequestURL(jakarta.servlet.http.HttpServletRequest request, String[] eliminateParms) 重载public static String getRequestURL(HttpServletRequest request, String[] eliminateParms,boolean delEndTag) 相当于getRequestURL(request,eliminateParms,false),不删除重构的URL中的末字符- 参数:
request- 请求对象eliminateParms- request中排除的参数列表- 返回:
- 重新构建的URL
-
isContainStr
判断某一个字符串是否存在于String数组之中- 参数:
array- 字符数组str- 字符串ignoreCase- 是否忽略大小写- 返回:
- true存在、false不存在
-
isContainStr
重载public static boolean isContainStr(String array[],String str,boolean ignoreCase) 相当于isContainStr(array,str,false),不区分大小写进行比较- 参数:
array- 字符数组str- 字符串- 返回:
- true存在、false不存在
-
requestConvertISOTOGBK
public static void requestConvertISOTOGBK(jakarta.servlet.http.HttpServletRequest request) -
getRequestParamStr
public static String getRequestParamStr(jakarta.servlet.http.HttpServletRequest request, String[] eliminateParms) 重建URL的参数字符串,根据request对象值,重新构建URL,其中可以排除部分参数 重新构建的参数字符串的最后一个字符串,这个结束符可以去掉- 参数:
request- 请求对象eliminateParms- request中排除的参数列表- 返回:
- 重新构建的URL
-