Package org.apache.wicket.protocol.http.servlet

Examples of org.apache.wicket.protocol.http.servlet.ServletWebRequest


   * @param servletRequest
   * @return a WebRequest object
   */
  protected WebRequest newWebRequest(final HttpServletRequest servletRequest)
  {
    return new ServletWebRequest(servletRequest);
  }
View Full Code Here


    }
    RequestParameters params = new RequestParameters();
    params.setBehaviorId(String.valueOf(index));
    if (request instanceof ServletWebRequest)
    {
      ServletWebRequest swr = (ServletWebRequest)request;
      // If we're coming in with an existing depth, use it. Otherwise,
      // compute from the URL. This provides correct behavior for repeated
      // AJAX requests: If we need to generate a URL within an AJAX
      // request for another one, it needs to be at the same depth as the
      // original AJAX request.
      int urlDepth = swr.getRequestParameters().getUrlDepth();
      params.setUrlDepth(urlDepth > -1 ? urlDepth : swr.getDepthRelativeToWicketHandler());
    }

    final IRequestTarget target = new BehaviorRequestTarget(component.getPage(), component,
      listener, params);
    return encodeUrlFor(target);
View Full Code Here

   * @param servletRequest
   * @return a WebRequest object
   */
  protected WebRequest newWebRequest(final HttpServletRequest servletRequest)
  {
    return new ServletWebRequest(servletRequest);
  }
View Full Code Here

  private void fallback(HttpServletRequest request, HttpServletResponse response) throws IOException
  {
   
    // The ServletWebRequest is created here to avoid code duplication. The getURL
    // call doesn't depend on anything wicket specific
    ServletWebRequest req = new ServletWebRequest(request);
    String url = req.getURL();
   
    // Get the relative URL we need for loading the resource from
    // the servlet context
    // NOTE: we NEED to put the '/' in front as otherwise some versions
    // of application servers (e.g. Jetty 5.1.x) will fail for requests
View Full Code Here

    }
    RequestParameters params = new RequestParameters();
    params.setBehaviorId(String.valueOf(index));
    if (request instanceof ServletWebRequest)
    {
      ServletWebRequest swr = (ServletWebRequest)request;
      // If we're coming in with an existing depth, use it. Otherwise,
      // compute from the URL. This provides correct behavior for repeated
      // AJAX requests: If we need to generate a URL within an AJAX
      // request for another one, it needs to be at the same depth as the
      // original AJAX request.
      int urlDepth = swr.getRequestParameters().getUrlDepth();
      params.setUrlDepth(urlDepth > -1 ? urlDepth : swr.getDepthRelativeToWicketHandler());
    }

    final IRequestTarget target = new BehaviorRequestTarget(component.getPage(), component,
      listener, params);
    return encodeUrlFor(target);
View Full Code Here

  @Override
  public void onResourceRequested()
  {
    RequestCycle requestCycle = RequestCycle.get();
    ServletWebRequest request = (ServletWebRequest)requestCycle.getRequest();

    // Grab a Meteor
    Meteor meteor = Meteor.build(request.getContainerRequest());
    // Add us to the listener list.
    meteor.addListener(this);
    meteor.suspend(-1);

    String uuid = meteor.getAtmosphereResource().uuid();
View Full Code Here

   *            the filter mapping read from web.xml
   * @return a WebRequest object
   */
  public WebRequest newWebRequest(HttpServletRequest servletRequest, final String filterPath)
  {
    return new ServletWebRequest(servletRequest, filterPath);
  }
View Full Code Here

        cookies.addAll(lastResponseCookies);
        request.addCookies(cookies.asList());
      }
    }

    ServletWebRequest servletWebRequest = newServletWebRequest();
    requestCycle = application.createRequestCycle(servletWebRequest,
      newServletWebResponse(servletWebRequest));
    ThreadContext.setRequestCycle(requestCycle);

    if (session == null)
View Full Code Here

    {
      // Change the request to a multipart web request so parameters are
      // parsed out correctly
      try
      {
        ServletWebRequest request = (ServletWebRequest)getRequest();
        final WebRequest multipartWebRequest = request.newMultipartWebRequest(getMaxSize(),
          getPage().getId());
        // TODO: Can't this be detected from header?
        getRequestCycle().setRequest(multipartWebRequest);
      }
      catch (final FileUploadException fux)
View Full Code Here

   * @param servletRequest
   * @return a WebRequest object
   */
  protected WebRequest newWebRequest(final HttpServletRequest servletRequest)
  {
    return new ServletWebRequest(servletRequest);
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.protocol.http.servlet.ServletWebRequest

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.