• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java WebRequestCycle类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.wicket.protocol.http.WebRequestCycle的典型用法代码示例。如果您正苦于以下问题:Java WebRequestCycle类的具体用法?Java WebRequestCycle怎么用?Java WebRequestCycle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



WebRequestCycle类属于org.apache.wicket.protocol.http包,在下文中一共展示了WebRequestCycle类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: defineEntryPoint

import org.apache.wicket.protocol.http.WebRequestCycle; //导入依赖的package包/类
private void defineEntryPoint(IRequestTarget aTarget) {
	RequestCycle requestCycle = RequestCycle.get();
	if (!(requestCycle instanceof WebRequestCycle)) {
		return;
	}
	String entryPoint = formatEntryPoint(aTarget);
	WebResponse response = ((WebRequestCycle) requestCycle).getWebResponse();
	response.setHeader(ENTRY_POINT_HEADER, entryPoint);
}
 
开发者ID:mpobjects,项目名称:xrebelhub-wicket-endpoints,代码行数:10,代码来源:XrhRequestLogger.java


示例2: cacheRequest

import org.apache.wicket.protocol.http.WebRequestCycle; //导入依赖的package包/类
/**
 * Cache the requested protected resource pending successful authentication.
 * 
 * @param pageClass
 */
public void cacheRequest(Class<? extends Page> pageClass) {
	// build absolute url with correctly encoded parameters?!
	Request req = WebRequestCycle.get().getRequest();
	Map<String, ?> params = req.getRequestParameters().getParameters();
	PageParameters pageParams = new PageParameters(params);
	String relativeUrl = WebRequestCycle.get().urlFor(pageClass, pageParams).toString();
	requestUrl = RequestUtils.toAbsolutePath(relativeUrl);
	if (isTemporary())
	{
		// we must bind the temporary session into the session store
		// so that we can re-use this session for reporting an error message
		// on the redirected page and continuing the request after
		// authentication.
		bind();
	}
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:22,代码来源:GitBlitWebSession.java


示例3: getExternalParams

import org.apache.wicket.protocol.http.WebRequestCycle; //导入依赖的package包/类
private static String getExternalParams(CharSequence encoded) {
    String externalParams;
    WebRequestCycle webRequestCycle = (WebRequestCycle) RequestCycle.get();
    HttpServletRequest request = webRequestCycle.getWebRequest().getHttpServletRequest();
    GlobalExtraParamsPlugin globalExtraParamsPlugin = PluginFactory.getPlugin(GlobalExtraParamsPlugin.class);
    if (globalExtraParamsPlugin != null) {
        externalParams = globalExtraParamsPlugin.getExtraParams(encoded, request);
    } else {
        externalParams = "";
    }
    return externalParams;
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:13,代码来源:ConstellioApplication.java


示例4: SmbServletPage

import org.apache.wicket.protocol.http.WebRequestCycle; //导入依赖的package包/类
public SmbServletPage(PageParameters parameters) throws SmbException {
      super(parameters);
      
      
      String recordID = parameters.getString(RECORD_ID);
      if (StringUtils.isBlank(recordID)) {
          throw new WicketRuntimeException(RECORD_ID + " parameter is required");
      } 
      String collectionName = parameters.getString(COLLECTION);
      if (StringUtils.isBlank(collectionName)) {
          throw new WicketRuntimeException(COLLECTION + " parameter is required");
      } 
      
      SmbFile downloadedSmbFile = getSmbFile(Long.valueOf(recordID), collectionName);
      
      WebRequestCycle requestCycle = (WebRequestCycle) RequestCycle.get();
      HttpServletResponse response = requestCycle.getWebResponse().getHttpServletResponse();
response.setContentType("application/octet-stream" );

response.setContentLength( (int) downloadedSmbFile .length() );
response.setHeader( "Content-Disposition", "attachment; filename=\"" + downloadedSmbFile.getName() + "\"" );

try{
	InputStream is = new BufferedInputStream(downloadedSmbFile.getInputStream());
	IOUtils.copy(is, response.getOutputStream());
	IOUtils.closeQuietly(is);
} catch(IOException e){
	throw new RuntimeException(e);
}
  }
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:31,代码来源:SmbServletPage.java


示例5: handleUsernamePasswordParameters

import org.apache.wicket.protocol.http.WebRequestCycle; //导入依赖的package包/类
private boolean handleUsernamePasswordParameters() {
	String iframeLoginUsername = RequestCycle.get().getRequest().getParameter("iframe_username");
	String iframeLoginPassword = RequestCycle.get().getRequest().getParameter("iframe_password");

	if (iframeLoginUsername != null && iframeLoginPassword != null) {
		boolean valid =  ConstellioSession.get().signIn(iframeLoginUsername, iframeLoginPassword);
		if (valid) {
			ConstellioSession.get().signIn(iframeLoginUsername, iframeLoginPassword);
			WebRequestCycle.get().setResponsePage(SearchFormPage.class);
			return true;
		}
	}
	return false;
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:15,代码来源:LoginPage.java


示例6: getThemeDislay

import org.apache.wicket.protocol.http.WebRequestCycle; //导入依赖的package包/类
private ThemeDisplay getThemeDislay() {
	HttpServletRequest req = ((ServletWebRequest) WebRequestCycle.get()
			.getRequest()).getHttpServletRequest();
	return (ThemeDisplay) req.getAttribute(WebKeys.THEME_DISPLAY);
}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:6,代码来源:HomePage.java



注:本文中的org.apache.wicket.protocol.http.WebRequestCycle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Utf8String类代码示例发布时间:2022-05-23
下一篇:
Java SqlOrderBy类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap