本文整理汇总了Java中org.apache.wicket.request.Request.getContainerRequest方法的典型用法代码示例。如果您正苦于以下问题:Java Request.getContainerRequest方法的具体用法?Java Request.getContainerRequest怎么用?Java Request.getContainerRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.wicket.request.Request
的用法示例。
在下文中一共展示了Request.getContainerRequest方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getContainerRequest
import org.apache.wicket.request.Request; //导入方法依赖的package包/类
public static HttpServletRequest getContainerRequest() {
final RequestCycle requestCycle = RequestCycle.get();
if (requestCycle == null) {
return null;
}
final Request request = requestCycle.getRequest();
if (request == null) {
return null;
}
return (HttpServletRequest) request.getContainerRequest();
}
示例2: getHttpServletRequest
import org.apache.wicket.request.Request; //导入方法依赖的package包/类
protected final HttpServletRequest getHttpServletRequest(final Request request)
{
Object containerRequest = request.getContainerRequest();
if (containerRequest == null || (containerRequest instanceof HttpServletRequest) == false)
{
throw new IllegalArgumentException("Request must be ServletWebRequest");
}
return (HttpServletRequest)containerRequest;
}
示例3: removeRepoPath
import org.apache.wicket.request.Request; //导入方法依赖的package包/类
public static void removeRepoPath(Request request, boolean storeAsRemoved) {
HttpServletRequest httpServletRequest = (HttpServletRequest) request.getContainerRequest();
RepoPath removedRepoPath = getRepoPath(httpServletRequest);
httpServletRequest.removeAttribute(ATTR_ARTIFACTORY_REPOSITORY_PATH);
if (removedRepoPath != null && storeAsRemoved) {
httpServletRequest.setAttribute(ATTR_ARTIFACTORY_REMOVED_REPOSITORY_PATH, removedRepoPath);
}
}
示例4: getCsrfToken
import org.apache.wicket.request.Request; //导入方法依赖的package包/类
public static CsrfToken getCsrfToken() {
Request req = RequestCycle.get().getRequest();
HttpServletRequest httpReq = (HttpServletRequest) req.getContainerRequest();
return (CsrfToken) httpReq.getAttribute("_csrf");
}
示例5: getHttpServletRequest
import org.apache.wicket.request.Request; //导入方法依赖的package包/类
public static HttpServletRequest getHttpServletRequest(final Request request)
{
return (HttpServletRequest) request.getContainerRequest();
}