Examples of makeReply()


Examples of org.w3c.jigsaw.http.Request.makeReply()

      c_b.setTime(new Date(getLong(ATTR_DATE_END, -1)));
      if (cal.before(c_a)) {
    reply = request.makeReply(HTTP.SERVICE_UNAVAILABLE);
    reply.setRetryAfter(c_a.getTime().getTime());
      } else if (cal.after(c_b)) {
    reply = request.makeReply(HTTP.SERVICE_UNAVAILABLE);
      }
  }
  if (reply != null) {
      HtmlGenerator g = new HtmlGenerator("Service Unavailable");
      g.append("You may retry after the delay or the date given");
View Full Code Here

Examples of org.w3c.jigsaw.http.Request.makeReply()

      request.setProxy(true);
      lr.setTarget(this.getResource().getResourceReference());
      return true;
  }
  // Emit a not found:
  Reply error = request.makeReply(HTTP.NOT_FOUND);
  if (request.getMethod().equals("GET"))
      error.setContent("Target resource not found.");
  lr.setTarget(null);
  lr.setReply(error);
  return true;
View Full Code Here

Examples of org.w3c.jigsaw.http.Request.makeReply()

      case PutListResource.FILE_UC:
      case PutListResource.FILE_PB:
      case PutListResource.FILE_DEL:
    return null;
      case PutListResource.FILE_MG:
    Reply   msg = request.makeReply(HTTP.CONFLICT);
    HtmlGenerator g = getHtmlGenerator("Warning");
    g.append ("<H1>Warning</H1> The file on publish space has "+
        "been modified directly but attempting to merge "+
        "has succeed.<p>"+
        "You should update the file before editing "+
View Full Code Here

Examples of org.w3c.jigsaw.http.Request.makeReply()

        "You should update the file before editing "+
        "it again.");
    msg.setStream(g);
    return msg;
      case PutListResource.FILE_CF:
    Reply error = request.makeReply(HTTP.CONFLICT);
    HtmlGenerator gerr = getHtmlGenerator("Warning");
    gerr.append ("<H1>Warning</H1> The file on publish space has "+
           "been modified directly and attempting to merge"+
           " has failed.<p>"+
           "Ask your system administrator.");
View Full Code Here

Examples of org.w3c.jigsaw.http.Request.makeReply()

          HTTPFrame.COND_FAILED)
      || (frame.checkIfModifiedSince(request) ==
          HTTPFrame.COND_FAILED)
      || (frame.checkIfUnmodifiedSince(request) ==
          HTTPFrame.COND_FAILED)) {
      Reply r = request.makeReply(HTTP.PRECONDITION_FAILED);
      r.setContent("Pre-condition failed.");
      return r;
        }
    } catch (InvalidResourceException ex) {
        ex.printStackTrace();
View Full Code Here

Examples of org.w3c.jigsaw.http.Request.makeReply()

        }
    }
      }
      String found = searchForbiddenStrings(in);
      if (found != null) {
    Reply error = request.makeReply(HTTP.FORBIDDEN);
    error.setReason("the string \""+found+"\" is forbidden.");
    error.setContent ("<p>the string \""+found+
          "\" is forbidden.</p><br> click "+
          "<A HREF=\""+getRedirectURL()+"\">here</A>"+
          " for explaination.");
View Full Code Here

Examples of org.w3c.jigsaw.webdav.DAVRequest.makeReply()

        } else {
      rr = dresource.createDirectoryResource(name);
        }
        if (rr == null) {
      Reply error =
          request.makeReply(HTTP.UNSUPPORTED_MEDIA_TYPE);
      error.setContent(
          "Failed to create resource "+
          name +" : "+
          "Unable to create the appropriate file:"+
          request.getURLPath()+
View Full Code Here

Examples of org.w3c.jigsaw.webdav.DAVRequest.makeReply()

          request.getURLPath()+
          " this media type is not supported");
      throw new HTTPException (error);
        }
    } else if (rr == null) {
        Reply error = request.makeReply(HTTP.FORBIDDEN) ;
        error.setContent("You are not allowed to create resource "+
             name +" : "+
             dresource.getIdentifier()+
             " is not extensible.");
        throw new HTTPException (error);
View Full Code Here

Examples of org.w3c.jigsaw.webdav.DAVRequest.makeReply()

    if (rr == null) {
        if (ls.countRemainingComponents() == 1) {
      request.setState(REMAINING_PATH, name);
      return true;
        } else {
      Reply error = request.makeReply(HTTP.CONFLICT) ;
      error.setContent("Can't create "+
           ls.getRemainingPath(true));
      throw new HTTPException (error);
        }
    }
View Full Code Here

Examples of org.w3c.jigsaw.webdav.DAVRequest.makeReply()

        " you are trying to reach is available only through "+
        " its full URL: <a href=\""+
        url + "\">" + url + "</a>.";
    if ( getRelocateFlag() ) {
        // Emit an error (with reloc if allowed)
        Reply reloc = request.makeReply(HTTP.FOUND);
        reloc.setContent(msg) ;
        reloc.setLocation(url);
        lr.setTarget(null);
        lr.setReply(reloc);
        return true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.