當前位置: 首頁>>代碼示例>>Java>>正文


Java WebApplication.get方法代碼示例

本文整理匯總了Java中org.apache.wicket.protocol.http.WebApplication.get方法的典型用法代碼示例。如果您正苦於以下問題:Java WebApplication.get方法的具體用法?Java WebApplication.get怎麽用?Java WebApplication.get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.wicket.protocol.http.WebApplication的用法示例。


在下文中一共展示了WebApplication.get方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: get

import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static MidPointApplication get() {
    return (MidPointApplication) WebApplication.get();
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:4,代碼來源:MidPointApplication.java

示例2: get

import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static SingularServerApplication get() {
    return (SingularServerApplication) WebApplication.get();
}
 
開發者ID:opensingular,項目名稱:singular-server,代碼行數:4,代碼來源:SingularServerApplication.java

示例3: open

import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
@Override
public ITearDownHandle open() {
	if (RequestCycle.get() != null) {
		return ExecutionContexts.noOp().open();
	}

	WebApplication application = WebApplication.get();

	final ServletContext context = application.getServletContext();

	final HttpSession newHttpSession = new MockHttpSession(context);
	final MockHttpServletRequest servletRequest = new ContextConfiguredMockHttpServletRequest(application,
			newHttpSession, context);
	final MockHttpServletResponse servletResponse = new MockHttpServletResponse(servletRequest);
	servletRequest.initialize();
	servletResponse.initialize();

	final ServletWebRequest webRequest = new ServletWebRequest(servletRequest, servletRequest.getFilterPrefix());
	final WebResponse webResponse = new BufferedWebResponse(new ServletWebResponse(webRequest, servletResponse));

	RequestCycle requestCycle = application.createRequestCycle(webRequest, webResponse);

	ITearDownHandle handle = new ITearDownHandle() {
		@Override
		public void close() {
			ThreadContext.setSession(null);
			ThreadContext.setRequestCycle(null);
		}
	};
	
	try {
		ThreadContext.setRequestCycle(requestCycle);
		// The session will be set automatically if required
		return handle;
	} catch (RuntimeException e) {
		try {
			handle.close();
		} catch (RuntimeException e2) {
			e.addSuppressed(e2);
		}
		throw e;
	}
}
 
開發者ID:openwide-java,項目名稱:owsi-core-parent,代碼行數:44,代碼來源:WicketContextProviderImpl.java

示例4: get

import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static MyApplication get()
{
	return (MyApplication) WebApplication.get();
}
 
開發者ID:sebfz1,項目名稱:wicket-quickstart-cdi-async,代碼行數:5,代碼來源:MyApplication.java

示例5: get

import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static UQasar get() {
	return (UQasar) WebApplication.get();
}
 
開發者ID:U-QASAR,項目名稱:u-qasar.platform,代碼行數:4,代碼來源:UQasar.java

示例6: get

import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static OrientDbWebApplication get()
{
    return (OrientDbWebApplication) WebApplication.get();
}
 
開發者ID:OrienteerBAP,項目名稱:wicket-orientdb,代碼行數:5,代碼來源:OrientDbWebApplication.java

示例7: get

import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static SyncopeEnduserApplication get() {
    return (SyncopeEnduserApplication) WebApplication.get();
}
 
開發者ID:apache,項目名稱:syncope,代碼行數:4,代碼來源:SyncopeEnduserApplication.java

示例8: get

import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static SyncopeConsoleApplication get() {
    return (SyncopeConsoleApplication) WebApplication.get();
}
 
開發者ID:apache,項目名稱:syncope,代碼行數:4,代碼來源:SyncopeConsoleApplication.java

示例9: get

import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static GitBlitWebApp get() {
	return (GitBlitWebApp) WebApplication.get();
}
 
開發者ID:warpfork,項目名稱:gitblit,代碼行數:4,代碼來源:GitBlitWebApp.java

示例10: get

import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static DemoApplication get() {
    return (DemoApplication) WebApplication.get();
}
 
開發者ID:documents4j,項目名稱:documents4j,代碼行數:4,代碼來源:DemoApplication.java

示例11: get

import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static NextServerApplication get() {
	return (NextServerApplication) WebApplication.get();
}
 
開發者ID:nextreports,項目名稱:nextreports-server,代碼行數:4,代碼來源:NextServerApplication.java


注:本文中的org.apache.wicket.protocol.http.WebApplication.get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。