本文整理匯總了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();
}
示例2: get
import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static SingularServerApplication get() {
return (SingularServerApplication) WebApplication.get();
}
示例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;
}
}
示例4: get
import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static MyApplication get()
{
return (MyApplication) WebApplication.get();
}
示例5: get
import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static UQasar get() {
return (UQasar) WebApplication.get();
}
示例6: get
import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static OrientDbWebApplication get()
{
return (OrientDbWebApplication) WebApplication.get();
}
示例7: get
import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static SyncopeEnduserApplication get() {
return (SyncopeEnduserApplication) WebApplication.get();
}
示例8: get
import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static SyncopeConsoleApplication get() {
return (SyncopeConsoleApplication) WebApplication.get();
}
示例9: get
import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static GitBlitWebApp get() {
return (GitBlitWebApp) WebApplication.get();
}
示例10: get
import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static DemoApplication get() {
return (DemoApplication) WebApplication.get();
}
示例11: get
import org.apache.wicket.protocol.http.WebApplication; //導入方法依賴的package包/類
public static NextServerApplication get() {
return (NextServerApplication) WebApplication.get();
}