Package org.apache.wicket.protocol.http

Examples of org.apache.wicket.protocol.http.WebApplication


        counter.getAndIncrement();
        return responseBuffer;
      }
    };

    final WebApplication application = new DummyApplication()
    {
      @Override
      protected void init()
      {
        super.init();
View Full Code Here


   * {@link RequireHttps}
   */
  @Test
  public void checkSecureIncoming()
  {
    final WebApplication application = new MockApplication();

    // needed to be able to call new WebPage()
    final WicketTester tester = new WicketTester(application);
    ThreadContext.setApplication(application);

View Full Code Here

      private static final long serialVersionUID = 1L;

      @Override
      public void onClick()
      {
        WebApplication webApplication = (WebApplication)Application.get();
        webApplication.getRequestLoggerSettings().setRequestsWindowSize(500);
        boolean enabled = webApplication.getRequestLoggerSettings()
          .isRequestLoggerEnabled();
        webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(!enabled);
      }
    };
    link.add(new Label("toggletext", new Model<String>()
    {
      private static final long serialVersionUID = 1L;

      @Override
      public String getObject()
      {
        WebApplication webApplication = (WebApplication)Application.get();
        IRequestLogger requestLogger = webApplication.getRequestLogger();
        if (requestLogger == null)
        {
          return "Enable request recording";
        }
        else
View Full Code Here

    add(navigator);
  }

  IRequestLogger getRequestLogger()
  {
    WebApplication webApplication = (WebApplication)Application.get();
    IRequestLogger requestLogger = webApplication.getRequestLogger();

    if (requestLogger == null)
      requestLogger = new RequestLogger();
    return requestLogger;
  }
View Full Code Here

  public WebSocketTester(final WicketTester wicketTester, final Page page)
  {
    Args.notNull(wicketTester, "wicketTester");
    Args.notNull(page, "page");

    WebApplication webApplication = wicketTester.getApplication();
    webApplication.getWicketFilter().setFilterPath("");

    socketProcessor = new TestWebSocketProcessor(wicketTester, page)
    {
      @Override
      protected void onOutMessage(String message)
View Full Code Here

  public WebSocketTester(final WicketTester wicketTester, final String resourceName)
  {
    Args.notNull(wicketTester, "wicketTester");
    Args.notNull(resourceName, "resourceName");

    WebApplication webApplication = wicketTester.getApplication();
    webApplication.getWicketFilter().setFilterPath("");

    socketProcessor = new TestWebSocketProcessor(wicketTester, resourceName)
    {
      @Override
      protected void onOutMessage(String message)
View Full Code Here

  @Override
  public void onOpen(Session session, EndpointConfig endpointConfig)
  {
    String appName = getApplicationName(session);

    WebApplication app = (WebApplication) WebApplication.get(appName);

    try
    {
      ThreadContext.setApplication(app);
      javaxWebSocketProcessor = new JavaxWebSocketProcessor(session, app, endpointConfig);
View Full Code Here

    add(navigator);
  }

  IRequestLogger getRequestLogger()
  {
    WebApplication webApplication = (WebApplication)Application.get();

    IRequestLogger requestLogger = webApplication.getRequestLogger();

    if (webApplication.getRequestLogger() == null)
      requestLogger = new RequestLogger();
    return requestLogger;
  }
View Full Code Here

  @Before
  public void before() throws Exception
  {
    tester = new WicketTester();

    WebApplication application = tester.getApplication();
    application.mountPage(EXPECTED_URL.toString(), DummyHomePage.class);

    /**
     * Use explicit crypt provider to prevent crypt warning output, see
     * SecuritySettings#getCryptFactory()
     */
    IProvider<ICrypt> cryptProvider = new IProvider<ICrypt>()
    {
      private ICryptFactory cryptFactory = new CachingSunJceCryptFactory(
        SecuritySettings.DEFAULT_ENCRYPTION_KEY);

      @Override
      public ICrypt get()
      {
        return cryptFactory.newCrypt();
      }
    };

    mapper = new CryptoMapper(application.getRootRequestMapper(), cryptProvider);
  }
View Full Code Here

   * @param homePage
   *            a home page <code>Class</code>
   */
  public <C extends Page> BaseWicketTester(final Class<C> homePage)
  {
    this(new WebApplication()
    {
      /**
       * @see org.apache.wicket.Application#getHomePage()
       */
      @Override
 
View Full Code Here

TOP

Related Classes of org.apache.wicket.protocol.http.WebApplication

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.