public class ServletRequestContext
extends org.apache.commons.fileupload.servlet.ServletRequestContext
request.getCharacterEncoding()
返回null
,那么返回默认值
ISO-8859-1
。该方法将被用来解析header,其中包括field name,file name等。原始类在
request.getCharacterEncoding()
返回null
时,将使用操作系统默认编码,这样将返回不确定的结果。经过修改后,就和servlet规范相一致。Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CHARSET |
Constructor and Description |
---|
ServletRequestContext(javax.servlet.http.HttpServletRequest request) |
Modifier and Type | Method and Description |
---|---|
String |
getCharacterEncoding() |
javax.servlet.http.HttpServletRequest |
getRequest() |
public static final String DEFAULT_CHARSET
public ServletRequestContext(javax.servlet.http.HttpServletRequest request)
public String getCharacterEncoding()
getCharacterEncoding
in interface org.apache.commons.fileupload.RequestContext
getCharacterEncoding
in class org.apache.commons.fileupload.servlet.ServletRequestContext
public javax.servlet.http.HttpServletRequest getRequest()
Copyright © 2006–2018 TinyGroup. All rights reserved.