org.apache.catalina.connector.Request.addParameter()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(121)

本文整理了Java中org.apache.catalina.connector.Request.addParameter方法的一些代码示例,展示了Request.addParameter的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.addParameter方法的具体详情如下:
包路径:org.apache.catalina.connector.Request
类名称:Request
方法名:addParameter

Request.addParameter介绍

[英]Add a parameter name and corresponding set of values to this Request. (This is used when restoring the original request on a form based login).
[中]向该请求添加参数名和相应的值集。(在基于表单的登录上恢复原始请求时使用)。

代码示例

代码示例来源:origin: org.glassfish.main.security/websecurity

public void addParameter(String name, String values[]) {
  httpRequest.addParameter(name, values);
}

代码示例来源:origin: org.jboss.jbossas/jboss-as-tomcat

String paramValues[] =
  saved.getParameterValues(paramName);
request.addParameter(paramName, paramValues);

代码示例来源:origin: org.picketlink.distribution/picketlink-jbas7

String paramName = (String) paramNames.next();
String[] paramValues = saved.getParameterValues(paramName);
request.addParameter(paramName, paramValues);

代码示例来源:origin: org.picketlink.distribution/picketlink-jbas5

String paramName = (String) paramNames.next();
String[] paramValues = saved.getParameterValues(paramName);
request.addParameter(paramName, paramValues);

代码示例来源:origin: org.glassfish.main.web/web-core

private void initParts() throws IOException, ServletException {
  if (parts != null) {
    return;
  }
  parts = new ArrayList<Part>();
  try {
    RequestItemIterator iter = new RequestItemIterator(this, request);
    while (iter.hasNext()) {
      RequestItem requestItem = iter.next();
      PartItem partItem = new PartItem(this,
                   requestItem.getHeaders(),
                   requestItem.getFieldName(),
                   requestItem.getContentType(),
                   requestItem.isFormField(),
                   requestItem.getSubmittedFileName(),
                   request.getCharacterEncoding());
      Streams.copy(requestItem.openStream(),
             partItem.getOutputStream(), true);
      String fileName = partItem.getSubmittedFileName();
      if (fileName == null || fileName.length() == 0) {
        // Add part name and value as a parameter
        request.addParameter(partItem.getName(),
                   new String[] {partItem.getString()});
      }
      parts.add((Part)partItem);
    }
  } catch (SizeException ex) {
    throw new IllegalStateException(ex);
  }
}

代码示例来源:origin: org.jboss.web/jbossweb

while (params.hasNext()) {
  String name = (String) params.next();
  request.addParameter(name,
      saved.getParameterValues(name));

代码示例来源:origin: jboss.web/jbossweb

while (params.hasNext()) {
  String name = (String) params.next();
  request.addParameter(name,
            saved.getParameterValues(name));

相关文章

Request类方法