Package railo.runtime.net.http

Examples of railo.runtime.net.http.HttpServletRequestDummy


        entry = it.next();
        _parameters[index++]=new Pair<String,Object>(entry.getKey(), entry.getValue());
      }
    }
   
    return new HttpServletRequestDummy(ResourceUtil.toResource(contextRoot), serverName, scriptName, queryString, cookies,
        _headers, _parameters, Caster.toStruct(attributes,null), session);
  }
View Full Code Here


    return dest;
  }

  public static  PageContextImpl createPageContext(ConfigWeb config,OutputStream os,String serverName,String requestURI,String queryString,Cookie[] cookies,Pair[] headers,Pair[] parameters,Struct attributes)  {
    CFMLFactory factory = config.getFactory();
        HttpServletRequest  req = new HttpServletRequestDummy(
        config.getRootDirectory(),
        serverName,
        requestURI,
        queryString,
        cookies,
View Full Code Here

 

  public static HttpServletRequest cloneHttpServletRequest(PageContext pc) {
    Config config = pc.getConfig();
    HttpServletRequest req = pc.getHttpServletRequest();
    HttpServletRequestDummy dest = HttpServletRequestDummy.clone(config,config.getRootDirectory(),req);
    return dest;
  }
View Full Code Here

  private PageContextImpl createPageContext(CFMLFactory factory, ComponentAccess app, String applicationName, String cfid,Collection.Key methodName) throws PageException {
    Resource root = factory.getConfig().getRootDirectory();
    String path = app.getPageSource().getFullRealpath();
   
    // Request
    HttpServletRequestDummy req = new HttpServletRequestDummy(root,"localhost",path,"",null,null,null,null,null);
    if(!StringUtil.isEmpty(cfid))req.setCookies(new Cookie[]{new Cookie("cfid",cfid),new Cookie("cftoken","0")});
   
    // Response 
    OutputStream os=DevNullOutputStream.DEV_NULL_OUTPUT_STREAM;
    try {
      Resource out = factory.getConfig().getConfigDir().getRealResource("output/"+methodName.getString()+".out");
View Full Code Here

  private PageContext createPageContext(CFMLFactory factory,String scriptName,String queryString, OutputStream os, HttpServletRequest formerReq) {
    Resource root = factory.getConfig().getRootDirectory();
    if(os==null)os=DevNullOutputStream.DEV_NULL_OUTPUT_STREAM;
   
    // Request
    HttpServletRequestDummy req = new HttpServletRequestDummy(
        root,"localhost",scriptName,queryString,
        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

    ByteArrayOutputStream os=new ByteArrayOutputStream();
   
   
   
   
    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.HttpServletRequestDummy

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.