本文整理了Java中org.glassfish.grizzly.http.server.Request.setRequestParameters
方法的一些代码示例,展示了Request.setRequestParameters
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.setRequestParameters
方法的具体详情如下:
包路径:org.glassfish.grizzly.http.server.Request
类名称:Request
方法名:setRequestParameters
[英]This method may be used if some other entity processed request parameters and wishes to expose them via the request. When this method is called, it will mark the internal request parameter state as having been processed.
[中]如果其他实体处理了请求参数,并希望通过请求公开这些参数,则可以使用此方法。调用此方法时,它会将内部请求参数状态标记为已处理。
代码示例来源:origin: javaee/grizzly
@Override
public void completed(final Request request) {
// Resume the asynchronous HTTP request processing
// (in other words finish the asynchronous HTTP request processing).
request.setRequestParameters(formParams);
servletRequest.setAttribute(UPLOADED_FILES, uploadedFiles.toArray(new File[uploadedFiles.size()]));
try {
filterChain.doFilter(servletRequest, servletResponse);
} catch (Exception e) {
LOGGER.log(Level.SEVERE, e.toString(), e);
} finally {
if (deleteAfterRequestEnd) {
clean(dir);
}
response.resume();
}
}
代码示例来源:origin: javaee/grizzly
@Override
public void completed(final Request request) {
// Resume the asynchronous HTTP request processing
// (in other words finish the asynchronous HTTP request processing).
request.setRequestParameters(formParams);
servletRequest.setAttribute(UPLOADED_FILES, uploadedFiles.toArray(new File[uploadedFiles.size()]));
try {
filterChain.doFilter(servletRequest, servletResponse);
} catch (Exception e) {
LOGGER.log(Level.SEVERE, e.toString(), e);
} finally {
if (deleteAfterRequestEnd) {
clean(dir);
}
response.resume();
}
}
内容来源于网络,如有侵权,请联系作者删除!