本文整理了Java中javax.servlet.http.HttpServletRequestWrapper.getParameterMap()
方法的一些代码示例,展示了HttpServletRequestWrapper.getParameterMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpServletRequestWrapper.getParameterMap()
方法的具体详情如下:
包路径:javax.servlet.http.HttpServletRequestWrapper
类名称:HttpServletRequestWrapper
方法名:getParameterMap
暂无
代码示例来源:origin: cloudfoundry/uaa
@Override
public Map<String, String[]> getParameterMap() {
return super.getParameterMap();
}
代码示例来源:origin: spring-projects/spring-framework
@Override
public Map<String, String[]> getParameterMap() {
if (this.cachedContent.size() == 0 && isFormPost()) {
writeRequestParametersToCachedContent();
}
return super.getParameterMap();
}
代码示例来源:origin: cloudfoundry/uaa
@Override
public Map<String, String[]> getParameterMap() {
Map<String, String[]> result = new HashMap<>(extendedParameters);
result.putAll(super.getParameterMap());
return result;
}
}
代码示例来源:origin: spring-projects/spring-framework
private void writeRequestParametersToCachedContent() {
try {
if (this.cachedContent.size() == 0) {
String requestEncoding = getCharacterEncoding();
Map<String, String[]> form = super.getParameterMap();
for (Iterator<String> nameIterator = form.keySet().iterator(); nameIterator.hasNext(); ) {
String name = nameIterator.next();
List<String> values = Arrays.asList(form.get(name));
for (Iterator<String> valueIterator = values.iterator(); valueIterator.hasNext(); ) {
String value = valueIterator.next();
this.cachedContent.write(URLEncoder.encode(name, requestEncoding).getBytes());
if (value != null) {
this.cachedContent.write('=');
this.cachedContent.write(URLEncoder.encode(value, requestEncoding).getBytes());
if (valueIterator.hasNext()) {
this.cachedContent.write('&');
}
}
}
if (nameIterator.hasNext()) {
this.cachedContent.write('&');
}
}
}
}
catch (IOException ex) {
throw new IllegalStateException("Failed to write request parameters to cached content", ex);
}
}
代码示例来源:origin: cloudfoundry/uaa
@Override
public Map<String, String[]> getParameterMap() {
Map<String, String[]> result = super.getParameterMap();
Map<String, String[]> modified = new HashMap<>(result);
modified.remove("code");
modified.put("code", new String[]{newCode});
return modified;
}
代码示例来源:origin: primefaces/primefaces
@Override
public Map getParameterMap() {
if (parameterMap == null) {
Map<String, String[]> map = new LinkedHashMap<>();
for (String formParam : formParams.keySet()) {
map.put(formParam, formParams.get(formParam).toArray(new String[0]));
}
map.putAll(super.getParameterMap());
parameterMap = Collections.unmodifiableMap(map);
}
return parameterMap;
}
代码示例来源:origin: cloudfoundry/uaa
@Override
public Map<String, String[]> getParameterMap() {
Map<String, String[]> map = super.getParameterMap();
if (map.containsKey("scope")) {
HashMap<String, String[]> result = new HashMap<>(map);
result.put("scope", getParameterValues("scope"));
map = result;
}
return map;
}
代码示例来源:origin: cloudfoundry/uaa
@Override
public Map<String, String[]> getParameterMap() {
Map<String, String[]> map = super.getParameterMap();
if (map.containsKey(RESPONSE_TYPE)) {
HashMap<String, String[]> result = new HashMap<>(map);
result.put(RESPONSE_TYPE, getParameterValues(RESPONSE_TYPE));
map = result;
}
return map;
}
代码示例来源:origin: cloudfoundry/uaa
@Override
public Map<String, String[]> getParameterMap() {
Map<String, String[]> map = super.getParameterMap();
if (map.containsKey("code")) {
Map<String, String[]> newMap = new HashMap<>(map);
newMap.put("code",new String[] {(String)getAttribute("code")});
map = newMap;
}
return map;
}
代码示例来源:origin: org.springframework/spring-web
@Override
public Map<String, String[]> getParameterMap() {
if (this.cachedContent.size() == 0 && isFormPost()) {
writeRequestParametersToCachedContent();
}
return super.getParameterMap();
}
代码示例来源:origin: org.springframework/spring-web
private void writeRequestParametersToCachedContent() {
try {
if (this.cachedContent.size() == 0) {
String requestEncoding = getCharacterEncoding();
Map<String, String[]> form = super.getParameterMap();
for (Iterator<String> nameIterator = form.keySet().iterator(); nameIterator.hasNext(); ) {
String name = nameIterator.next();
List<String> values = Arrays.asList(form.get(name));
for (Iterator<String> valueIterator = values.iterator(); valueIterator.hasNext(); ) {
String value = valueIterator.next();
this.cachedContent.write(URLEncoder.encode(name, requestEncoding).getBytes());
if (value != null) {
this.cachedContent.write('=');
this.cachedContent.write(URLEncoder.encode(value, requestEncoding).getBytes());
if (valueIterator.hasNext()) {
this.cachedContent.write('&');
}
}
}
if (nameIterator.hasNext()) {
this.cachedContent.write('&');
}
}
}
}
catch (IOException ex) {
throw new IllegalStateException("Failed to write request parameters to cached content", ex);
}
}
代码示例来源:origin: oblac/jodd
/**
* @see javax.servlet.http.HttpServletRequest#getParameterMap()
*/
@Override
public Map<String, String[]> getParameterMap() {
if (mreq == null) {
return super.getParameterMap();
}
Map<String, String[]> map = new HashMap<>();
Enumeration enumeration = getParameterNames();
while (enumeration.hasMoreElements()) {
String name = (String) enumeration.nextElement();
map.put(name, this.getParameterValues(name));
}
return map;
}
代码示例来源:origin: geoserver/geoserver
protected void parseParameters() {
if (myParameterMap != null) return;
String contentType = myWrappedRequest.getContentType();
if (myWrappedRequest.getMethod().equals("POST")
&& contentType != null
&& contentType.startsWith("application/x-www-form-urlencoded")) {
parseFormBody();
} else {
myParameterMap = new HashMap(super.getParameterMap());
for (Object key : myParameterMap.keySet()) {
Object value = myParameterMap.get(key);
if (value instanceof String[]) {
myParameterMap.put(key, Arrays.asList(((String[]) value)));
} else if (!(value instanceof List)) {
myParameterMap.put(key, Converters.convert(value, List.class));
}
}
}
}
代码示例来源:origin: com.liferay.portal/com.liferay.portal.kernel
@Override
public Map<String, String[]> getParameterMap() {
Map<String, String[]> map = new HashMap<>();
if (_inherit) {
map.putAll(super.getParameterMap());
}
map.putAll(_params);
return map;
}
代码示例来源:origin: apache/servicecomb-java-chassis
private void mergeParameterMaptoListMap(Map<String, List<String>> listMap) {
for (Entry<String, String[]> entry : super.getParameterMap().entrySet()) {
List<String> values = listMap.computeIfAbsent(entry.getKey(), k -> new ArrayList<>());
// follow servlet behavior, inherited value first, and then body value
values.addAll(0, Arrays.asList(entry.getValue()));
}
}
代码示例来源:origin: paoding-code/paoding-rose
@Override
@SuppressWarnings("unchecked")
public Map getParameterMap() {
Map<String, String[]> map = new HashMap<String, String[]>(super.getParameterMap());
for (Map.Entry<String, String> entry : parameters.entrySet()) {
if (!map.containsKey(entry.getKey())) {
map.put(entry.getKey(), new String[] { parameters.get(entry.getKey()) });
}
}
return Collections.unmodifiableMap(map);
}
代码示例来源:origin: pig4cloud/pig
@Override
public Map<String, String[]> getParameterMap() {
Map<String, String[]> map = new LinkedHashMap<>();
Map<String, String[]> parameters = super.getParameterMap();
for (String key : parameters.keySet()) {
String[] values = parameters.get(key);
for (int i = 0; i < values.length; i++) {
values[i] = xssEncode(values[i]);
}
map.put(key, values);
}
return map;
}
代码示例来源:origin: apache/servicecomb-java-chassis
private Map<String, String[]> parseParameterMap() {
// 1.post method already parsed by servlet
// 2.not APPLICATION_FORM_URLENCODED, no need to enhance
if (getMethod().equalsIgnoreCase(HttpMethod.POST)
|| !StringUtils.startsWithIgnoreCase(getContentType(), MediaType.APPLICATION_FORM_URLENCODED)) {
return super.getParameterMap();
}
Map<String, List<String>> listMap = parseUrlEncodedBody();
mergeParameterMaptoListMap(listMap);
return convertListMapToArrayMap(listMap);
}
代码示例来源:origin: com.atlassian.jira/jira-core
@Override
public Map getParameterMap()
{
Map parameterMap = super.getParameterMap();
return parameterMap;
}
代码示例来源:origin: info.magnolia/magnolia-core
@Override
public Map getParameterMap() {
Map<String, String[]> parameterMap = new HashMap<String, String[]>();
parameterMap.putAll(super.getParameterMap());
parameterMap.putAll(form.getParameters());
return parameterMap;
}
内容来源于网络,如有侵权,请联系作者删除!