本文整理匯總了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();
}