/** * By default returns the WebApplication's default request cycle processor. Typically, you don't * override this method but instead override {@link WebApplication#newRequestCycleProcessor()}. * <p> * <strong>if you decide to override this method to provide a custom processor per request * cycle, any mounts done via WebApplication will not work and and * {@link #onRuntimeException(Page, RuntimeException)} is not called unless you deliberately put * effort in it to make it work.</strong> * </p> * * @see org.apache.wicket.RequestCycle#getProcessor() */ public IRequestCycleProcessor getProcessor() { return ((WebApplication)getApplication()).getRequestCycleProcessor(); }
/** * By default returns the WebApplication's default request cycle processor. Typically, you don't * override this method but instead override {@link WebApplication#newRequestCycleProcessor()}. * <p> * <strong>if you decide to override this method to provide a custom processor per request * cycle, any mounts done via WebApplication will not work and and * {@link #onRuntimeException(Page, RuntimeException)} is not called unless you deliberately put * effort in it to make it work.</strong> * </p> * * @see org.apache.wicket.RequestCycle#getProcessor() */ @Override public IRequestCycleProcessor getProcessor() { return ((WebApplication)getApplication()).getRequestCycleProcessor(); }
public ICrypt newCrypt() { WebRequestCycle rc = (WebRequestCycle)RequestCycle.get(); // get http session, create if necessary HttpSession session = rc.getWebRequest().getHttpServletRequest().getSession(true); // retrieve or generate encryption key from session final String keyAttr = rc.getApplication().getApplicationKey() + "." + getClass().getName(); String key = (String)session.getAttribute(keyAttr); if (key == null) { // generate new key key = session.getId() + "." + UUID.randomUUID().toString(); session.setAttribute(keyAttr, key); } // build the crypt based on session key ICrypt crypt = new SunJceCrypt(); crypt.setKey(key); return crypt; } }
/** * @see org.apache.wicket.RequestCycle#newClientInfo() */ protected ClientInfo newClientInfo() { if (getApplication().getRequestCycleSettings().getGatherExtendedBrowserInfo()) { Session session = getSession(); if (session.getMetaData(BROWSER_WAS_POLLED_KEY) == null) { // we haven't done the redirect yet; record that we will be // doing that now and redirect session.setMetaData(BROWSER_WAS_POLLED_KEY, Boolean.TRUE); String url = "/" + getRequest().getURL(); throw new RestartResponseException(new BrowserInfoPage(url)); } // if we get here, the redirect already has been done; clear // the meta data entry; we don't need it any longer is the client // info object will be cached too session.setMetaData(BROWSER_WAS_POLLED_KEY, (Boolean)null); } return new WebClientInfo(this); }
protected ClientInfo newClientInfo() if (getApplication().getRequestCycleSettings().getGatherExtendedBrowserInfo())
String bufferId = stripped.substring(index + 1); String sessionId = getApplication().getSessionStore().getSessionId(request, true); ((WebApplication)application).addBufferedResponse(sessionId, bufferId,
String stripped = Strings.replaceAll(redirectUrl, "../", "").toString(); int index = stripped.indexOf("?"); String sessionId = getApplication().getSessionStore().getSessionId(request, true); ((WebApplication)application).addBufferedResponse(sessionId,