Package railo.runtime.net.http

Examples of railo.runtime.net.http.HttpServletResponseDummy


    return new HttpServletRequestDummy(ResourceUtil.toResource(contextRoot), serverName, scriptName, queryString, cookies,
        _headers, _parameters, Caster.toStruct(attributes,null), session);
  }

  public HttpServletResponse createHttpServletResponse(OutputStream io) {
    return new HttpServletResponseDummy(io);
  }
View Full Code Here


  }
 
  public static HttpServletResponse createHttpServletResponse(OutputStream os) {
    if(os==null) os = DevNullOutputStream.DEV_NULL_OUTPUT_STREAM;
   
    HttpServletResponseDummy dest = new HttpServletResponseDummy(os);
    return dest;
  }
View Full Code Here

        undefined.setMode(oldMode);
        //pc.getScopeFactory().recycle(newArgs);
            pc.getScopeFactory().recycle(newLocal);
           
            if(pc.getHttpServletResponse() instanceof HttpServletResponseDummy) {
              HttpServletResponseDummy rsp=(HttpServletResponseDummy) pc.getHttpServletResponse();
              pc.flush();
              contentType=rsp.getContentType();
              Pair<String,Object>[] _headers = rsp.getHeaders();
              if(_headers!=null)for(int i=0;i<_headers.length;i++){
                if(_headers[i].getName().equalsIgnoreCase("Content-Encoding"))
                  contentEncoding=Caster.toString(_headers[i].getValue(),null);
              }
            }
View Full Code Here

    }
    catch (IOException e) {
      e.printStackTrace();
      // TODO was passiert hier
    }
    HttpServletResponseDummy rsp = new HttpServletResponseDummy(os);
   
    // PageContext
    PageContextImpl pc = (PageContextImpl) factory.getRailoPageContext(factory.getServlet(), req, rsp, null, false, -1, false);
    // ApplicationContext
    ClassicApplicationContext ap = new ClassicApplicationContext(factory.getConfig(),applicationName,false,app==null?null:ResourceUtil.getResource(pc,app.getPageSource(),null));
View Full Code Here

        ReqRspUtil.getCookies(factory.getConfig(),formerReq),
        HttpUtil.cloneHeaders(formerReq),
        HttpUtil.cloneParameters(formerReq),
        HttpUtil.getAttributesAsStruct(formerReq),null);
        req.addHeader("AMF-Forward", "true");
    HttpServletResponseDummy rsp = new HttpServletResponseDummy(os);

    return  factory.getRailoPageContext(factory.getServlet(), req, rsp, null, false, -1, false);
  }
View Full Code Here

    return  factory.getRailoPageContext(factory.getServlet(), req, rsp, null, false, -1, false);
  }
 
  private void writeBackResponse(PageContext pc, HttpServletResponse rsp) {
    HttpServletResponseDummy hsrd=(HttpServletResponseDummy) pc.getHttpServletResponse();
       
    // Cookie
    Cookie[] cookies = hsrd.getCookies();
        if(cookies!=null) {
          for(int i=0;i<cookies.length;i++) {
            rsp.addCookie(cookies[i]);
          }
        }
       
        // header
        Pair<String,Object>[] headers = hsrd.getHeaders();
        Pair<String,Object> header ;
        Object value;
        if(headers!=null) {
          for(int i=0;i<headers.length;i++) {
            header=headers[i];
View Full Code Here

    try{
      _call(parent,pc);
    }
    finally{
      try {
      HttpServletResponseDummy rsp=(HttpServletResponseDummy) pc.getHttpServletResponse();
     
      String enc = ReqRspUtil.getCharacterEncoding(pc,rsp);
      //if(enc==null) enc="ISO-8859-1";
     
      pc.getOut().flush(); //make sure content is flushed
View Full Code Here

   
   
    HttpServletRequestDummy req=new HttpServletRequestDummy(
        root,serverName,uri.getPath(),uri.getQuery(),cookies,headers,parameters,attributes,null);
    req.setProtocol("CLI/1.0");
    HttpServletResponse rsp=new HttpServletResponseDummy(os);
   
    serviceCFML(servlet, req, rsp);
    String res = os.toString(ReqRspUtil.getCharacterEncoding(null,rsp));
    System.out.println(res);
  }
View Full Code Here

TOP

Related Classes of railo.runtime.net.http.HttpServletResponseDummy

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.