Package org.archive.wayback.core

Examples of org.archive.wayback.core.UIResults


      }
    }
   
    httpRequest.setAttribute("exception", exception);
    UIResults uiResults = new UIResults(wbRequest);
    uiResults.storeInRequest(httpRequest, finalJspPath);    

    RequestDispatcher dispatcher = httpRequest
        .getRequestDispatcher(finalJspPath);
    if(dispatcher == null) {
      throw new ServletException("Null dispatcher for " + finalJspPath);
View Full Code Here


  throws ServletException, IOException {
   
    WaybackRequest wbRequest = new WaybackRequest();
    wbRequest.setContextPrefix(getAbsoluteLocalPrefix(httpRequest));
    wbRequest.setContext(this);
    UIResults uiResults = new UIResults(wbRequest);
    String translated = "/" + translateRequestPathQuery(httpRequest);
    uiResults.storeInRequest(httpRequest,translated);
    RequestDispatcher dispatcher = null;
//    // special case for the front '/' page:
//    if(translated.length() == 0) {
//      translated = "/";
//    } else {
View Full Code Here

  public void renderException(HttpServletRequest httpRequest,
      HttpServletResponse httpResponse, WaybackRequest wbRequest,
      WaybackException exception) throws ServletException, IOException {

    httpRequest.setAttribute("exception", exception);
    UIResults uiResults = new UIResults(wbRequest);
    String jsp = errorJsp;
    if(wbRequest.containsKey(WaybackConstants.REQUEST_XML_DATA)) {
      jsp = xmlErrorJsp;
    }
    uiResults.storeInRequest(httpRequest,jsp);

    proxyRequest(httpRequest,httpResponse,jsp);
  }
View Full Code Here

  public void renderCaptureResults(HttpServletRequest httpRequest,
      HttpServletResponse httpResponse, WaybackRequest wbRequest,
      CaptureSearchResults results, ResultURIConverter uriConverter)
      throws ServletException, IOException {

    UIResults uiResults = new UIResults(wbRequest,(queryUriConverter != null ? queryUriConverter : uriConverter),results);
    if(wbRequest.isXMLMode()) {
      uiResults.forward(httpRequest, httpResponse, xmlCaptureJsp);
    } else {
      uiResults.forward(httpRequest, httpResponse, captureJsp);
    }
  }
View Full Code Here

  public void renderUrlResults(HttpServletRequest httpRequest,
      HttpServletResponse httpResponse, WaybackRequest wbRequest,
      UrlSearchResults results, ResultURIConverter uriConverter)
      throws ServletException, IOException {

    UIResults uiResults = new UIResults(wbRequest,(queryUriConverter != null ? queryUriConverter : uriConverter),results);
    if(wbRequest.isXMLMode()) {
      uiResults.forward(httpRequest, httpResponse, xmlUrlJsp);
    } else {
      uiResults.forward(httpRequest, httpResponse, urlJsp);
    }
  }
View Full Code Here

      HttpServletResponse httpResponse, WaybackRequest wbRequest,
      WaybackException exception, ResultURIConverter uriConverter)
    throws ServletException, IOException {

    httpRequest.setAttribute("exception", exception);
    UIResults uiResults = new UIResults(wbRequest,uriConverter,exception);
    boolean handled = false;
    if((wbRequest != null) && !wbRequest.isReplayRequest()) {

      if(wbRequest.isXMLMode()) {
        uiResults.forward(httpRequest, httpResponse, xmlErrorJsp);
        handled = true;
      }

    } else if (requestIsEmbedded(httpRequest, wbRequest)) {
   
      // try to not cause client errors by sending the HTML response if
      // this request is ebedded, and is obviously one of the special
      // types:
      handled = true;

      if (requestIsJavascript(httpRequest, wbRequest)) {

        uiResults.forward(httpRequest, httpResponse,
            javascriptErrorJsp);

      } else if (requestIsCSS(httpRequest, wbRequest)) {

        uiResults.forward(httpRequest, httpResponse, cssErrorJsp);

      } else if (requestIsImage(httpRequest, wbRequest)) {

        uiResults.forward(httpRequest, httpResponse, imageErrorJsp);

      } else {
        handled = false;
      }
    }
    if(!handled) {
      uiResults.forward(httpRequest, httpResponse, errorJsp);
    }
  }
View Full Code Here

    this.isAjax = wbRequest.isAjaxRequest();

    this.httpRequest = httpRequest;
    this.httpResponse = httpResponse;
    uiResults =
      new UIResults(wbRequest, uriConverter, results, result, resource);
  }
View Full Code Here

    WaybackRequest wbRequest = new WaybackRequest();
//      wbRequest.setContextPrefix(getUrlRoot());
    wbRequest.setAccessPoint(this);
    wbRequest.extractHttpRequestInfo(httpRequest);
    UIResults uiResults = new UIResults(wbRequest,uriConverter);
    try {
      uiResults.forward(httpRequest, httpResponse, translatedQ);
      return true;
    } catch(IOException e) {
      // TODO: figure out if we got IO because of a missing dispatcher
    }
View Full Code Here

  public void renderResource(HttpServletRequest httpRequest,
      HttpServletResponse httpResponse, WaybackRequest wbRequest,
      CaptureSearchResult result, Resource resource,
      ResultURIConverter uriConverter, CaptureSearchResults results)
          throws ServletException, IOException, WaybackException {
    UIResults uiResults =
        new UIResults(wbRequest, uriConverter, results, result, resource);
    uiResults.forward(httpRequest, httpResponse,
        targetJsp);
  }
View Full Code Here

   
    if (wbRequest.isAjaxRequest()) {
      return "";
    }
   
    UIResults uiResults = new UIResults(wbRequest,uriConverter,results,
        result,resource);

    StringHttpServletResponseWrapper wrappedResponse =
      new StringHttpServletResponseWrapper(httpResponse);
    uiResults.forward(httpRequest, wrappedResponse, jspPath);
    return wrappedResponse.getStringResponse();
  }
View Full Code Here

TOP

Related Classes of org.archive.wayback.core.UIResults

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.