Examples of makeReply()


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

      reply.setContent(ex.getMessage());
  } catch (ProtocolException pex) {
      if (pex.hasReply())
    reply = (Reply) pex.getReply();
      else {
    reply = req.makeReply(HTTP.INTERNAL_SERVER_ERROR);
    reply.setContent(pex.getMessage());
      }
  }
  //copy reply into response...
  if (reply.hasStream()) {
View Full Code Here

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

      req.setState(PATH_INFO_P, jreq.getPathInfo());
      req.setState(QUERY_STRING_P, jreq.getQueryString());
      req.setState(JigsawHttpServletResponse.INCLUDED, Boolean.TRUE);
      reply = (Reply) server.perform(req);
  } catch (ResourceException ex) {
      reply = req.makeReply(HTTP.INTERNAL_SERVER_ERROR);
      reply.setContent(ex.getMessage());
  } catch (ProtocolException pex) {
      if (pex.hasReply())
    reply = (Reply) pex.getReply();
      else {
View Full Code Here

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

      reply.setContent(ex.getMessage());
  } catch (ProtocolException pex) {
      if (pex.hasReply())
    reply = (Reply) pex.getReply();
      else {
    reply = req.makeReply(HTTP.INTERNAL_SERVER_ERROR);
    reply.setContent(pex.getMessage());
      }
  }

  if (reply.hasStream()) {
View Full Code Here

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

  }

  // This should never happen: either the negotiation succeed, or the
  // negotiate method should return an error.
  if ( selected == null ) {
      Reply error = request.makeReply(HTTP.INTERNAL_SERVER_ERROR) ;
      error.setContent("Error negotiating among resource's variants.");
      throw new HTTPException(error) ;
  }

  try {
View Full Code Here

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

      if (itsframe != null) {
    reply.setContentLocation(
          itsframe.getURL(request).toExternalForm()) ;
    return reply;
      }
      Reply error = request.makeReply(HTTP.INTERNAL_SERVER_ERROR) ;
      error.setContent("Error negotiating : "+
           "selected resource has no HTTPFrame");
      throw new HTTPException(error) ;
  } catch (InvalidResourceException ex) {
      Reply error = request.makeReply(HTTP.INTERNAL_SERVER_ERROR) ;
View Full Code Here

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

      Reply error = request.makeReply(HTTP.INTERNAL_SERVER_ERROR) ;
      error.setContent("Error negotiating : "+
           "selected resource has no HTTPFrame");
      throw new HTTPException(error) ;
  } catch (InvalidResourceException ex) {
      Reply error = request.makeReply(HTTP.INTERNAL_SERVER_ERROR) ;
      error.setContent("Error negotiating : Invalid selected resource");
      throw new HTTPException(error) ;
  } finally {
      selected.unlock();
  }
View Full Code Here

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

      } else if ( status == CVS.DIR_NCO ) {
    // Checkout directory, and relocate:
    getCvsManager().updateDirectory(name);
    Request request = (Request)ls.getRequest();
    if ( request != null ) {
        Reply relocate = request.makeReply(HTTP.FOUND);
        try {
      URL myloc    = getURL(request);
      URL location = new URL(myloc, name+"/CVS");
      relocate.setLocation(location);
      lr.setReply(relocate);
View Full Code Here

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

      try {
    loc = new URL(req.getURL(), result);
      } catch (MalformedURLException ex) {
    return null;
      }
      Reply reply = req.makeReply(HTTP.FOUND);
      reply.setLocation(loc);
      HtmlGenerator g = new HtmlGenerator("Moved");
      g.append("<P>This resource has moved, click  if your browser"
         + " doesn't support automatic redirection<BR>"+
         "<A HREF=\""+loc.toExternalForm()+"\">"+
View Full Code Here

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

      InetAddress ia = sc.getInetAddress();
      if (ia.equals(proxy_ia)) // same, it is ok :)
    return null;
  }
  // failed, restrict access
  Reply r = request.makeReply(HTTP.USE_PROXY);
  if (r != null) {
      HtmlGenerator g = new HtmlGenerator("Use Proxy");
      g.append("You should use the following proxy to access" +
         " this resource: " + getString(ATTR_PROXY, "localhost"));
      r.setStream(g);
View Full Code Here

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

    }
    request.setURL(newurl);
    request.setHost(newhost);
      }
  } catch (MalformedURLException ex) {
      Reply error = request.makeReply(HTTP.INTERNAL_SERVER_ERROR);
      error.setContent("<html><head><title>Server Error</title>"+
           "</head><body><h1>Server misconfigured</h1>"+
           "<p>The resource <b>"+getIdentifier()+"</b>"+
           "has an invalid target attribute : <p><b>"+
           getTarget()+"</b></body></html>");     
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.