Examples of makeReply()


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

      rr = dresource.createResource(name, request);
        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.http.Request.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.http.Request.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

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

        reloc.setLocation(url);
        lr.setTarget(null);
        lr.setReply(reloc);
        return true;
    } else {
        Reply error = request.makeReply(HTTP.NOT_FOUND) ;
        error.setContent(msg) ;
        lr.setTarget(null);
        lr.setReply(error);
        return true;
    }
View Full Code Here

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

    stated = true;
      }
      Reply r = (Reply) shex.getReply();
      if (reply == null) {
    // Send an appropriate error message back:
    reply = request.makeReply(HTTP.BAD_GATEWAY);
    boolean showerr =
        props.getBoolean(httpd.DISPLAY_URL_ON_ERROR_P, false);
   
    if (showerr) {
        reply.setContent("An HTTP error occured while getting: "
View Full Code Here

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

        reqcount++;
        reqerred++;
    }
    stated = true;
      }
      reply = request.makeReply(HTTP.BAD_GATEWAY);
      boolean showerr =
    props.getBoolean(httpd.DISPLAY_URL_ON_ERROR_P, false);
     
      if (showerr) {
    reply.setContent("An HTTP error occured while getting: "
View Full Code Here

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

      }
      if (reply == null) {
    // Send an appropriate error message back:
    String msg = hex.getMessage();
    if (msg.startsWith("Unable to contact target server ")) {
        reply = request.makeReply(HTTP.GATEWAY_TIMEOUT);
    } else {
        reply = request.makeReply(HTTP.BAD_GATEWAY);
    }
    boolean showerr =
        props.getBoolean(httpd.DISPLAY_URL_ON_ERROR_P, false);
View Full Code Here

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

    // Send an appropriate error message back:
    String msg = hex.getMessage();
    if (msg.startsWith("Unable to contact target server ")) {
        reply = request.makeReply(HTTP.GATEWAY_TIMEOUT);
    } else {
        reply = request.makeReply(HTTP.BAD_GATEWAY);
    }
    boolean showerr =
        props.getBoolean(httpd.DISPLAY_URL_ON_ERROR_P, false);
   
    if (showerr) {
View Full Code Here

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

        reqerred++;
    }
    stated = true;
      }
      // Send an appropriate error message back:
      reply = request.makeReply(HTTP.GATEWAY_TIMEOUT);
      boolean showerr = props.getBoolean(httpd.DISPLAY_URL_ON_ERROR_P,
                 false);
     
      if (showerr) {
    reply.setContent("An HTTP error occured while getting: "
View Full Code Here

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

  Request req = (Request) request;
  Reply   rep = null;
  if (checkHeaders(req)) {
      return null;
  }
  rep = req.makeReply(HTTP.FORBIDDEN);
  HtmlGenerator g = new HtmlGenerator("Forbidden - Headers missing");
  g.append("Some Headers, mandatory for this resource, are missing.");
  if (sendHeaderList && (headerNames != null)) {
      g.append("<ul>");
      for (int i=0; i<headerNames.length; i++) {
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.