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