Package railo.runtime.config

Examples of railo.runtime.config.Config


    // appName
    last=index+1;
    index=key.indexOf(':',last);
    String appName=key.substring(last);
       
    Config config = ThreadLocalPageContext.getConfig();
   
    _doEnd((CFMLFactoryImpl) config.getFactory(), appName, cfid);
  }
View Full Code Here


  }

  public static String getClassname(Component component) {
      PageSource ps = component.getPageSource();
      String path=ps.getDisplayPath();// Must remove webroot
      Config config = ps.getMapping().getConfig();
      String root = config.getRootDirectory().getAbsolutePath();
      if(path.startsWith(root))
        path=path.substring(root.length());

      path=path.replace('\\', '/').toLowerCase();
      path=ListUtil.trim(path, "/");
View Full Code Here

        String[] tmp = HTTPUtil.splitMimeTypeAndCharset(contentType,null);
        //String mimetype=tmp[0];
        String charset=tmp[1];
       
        if(StringUtil.isEmpty(charset,true)) {
          Config config = ThreadLocalPageContext.getConfig();
          if(config!=null)charset=config.getWebCharset();
        }
       
        try {
          return IOUtil.toString(is, charset);
        } catch (IOException e) {}
View Full Code Here

    return new HttpServletResponseDummy(io);
  }

  @Override
  public PageContext createPageContext(HttpServletRequest req, HttpServletResponse rsp, OutputStream out) {
    Config config = ThreadLocalPageContext.getConfig();
    return (PageContext) ((CFMLFactoryImpl)config.getFactory()).getPageContext(config.getFactory().getServlet(), req, rsp, null, false, -1, false);
  }
View Full Code Here


  @Override
  public int doStartTag() throws PageException  {
      railo.commons.io.log.Log logger;
      Config config =pageContext.getConfig();
      if(file==null) {
        if(log==LOG_SCHEDULER)logger=config.getScheduleLogger();
        else if(log==LOG_CONSOLE)logger=LogConsole.getInstance(config, railo.commons.io.log.Log.LEVEL_INFO);
          else logger=config.getApplicationLogger();
         
      }
      else {
        if(charset==null) charset=pageContext.getConfig().getResourceCharset();
        Resource logDir=config.getConfigDir().getRealResource("logs");
          if(!logDir.exists())logDir.mkdirs();
          try {
            Resource f = logDir.getRealResource(file);
                logger=new LogResource(f,railo.commons.io.log.Log.LEVEL_INFO,charset);
            } catch (IOException e) {
View Full Code Here

    public static Class toClass(String className) throws ClassException {
      try {
      return Class.forName(className);
    }
    catch (ClassNotFoundException e) {
      Config config = ThreadLocalPageContext.getConfig();
      if(config!=null) return ClassUtil.loadClass(config.getClassLoader(),className);
      return ClassUtil.loadClass(className);
    }
  }
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

      finally {
        IOUtil.closeEL(r);
      }
        }
        else if(o instanceof InputStream) {
          Config config = ThreadLocalPageContext.getConfig();
          InputStream r=null;
      try {
        return IOUtil.toString(r=(InputStream)o,config.getWebCharset());
      }
      catch (IOException e) {
        throw Caster.toPageException(e);
      }
      finally {
        IOUtil.closeEL(r);
      }
        }
        else if(o instanceof byte[]) {
          Config config = ThreadLocalPageContext.getConfig();
         
          try {
        return new String((byte[])o,config.getWebCharset());
      } catch (Throwable t) {
        return new String((byte[])o);
      }
        }
        else if(o instanceof char[]) return new String((char[])o);
View Full Code Here

              }
            // timeout exceptionif(ci.isAlive()) throw new IOException("timeout occur while invoking page ["+ci.url+"]");
           
            if(ci.isAlive()){
              ci.interrupt();
              Config config = ThreadLocalPageContext.getConfig();
              SystemOut.printDate(config!=null?config.getErrWriter():new PrintWriter(System.err),"timeout ["+timeout+" ms] occur while invoking page ["+ci.url+"]");
            }
          }
         
          //print.out("exe child");
          it = childIndexer.iterator();
View Full Code Here

  public static Cache getDefault(PageContext pc, int type,Cache defaultValue) {
    // get default from application conetx
    String name=null;
    if(pc!=null && pc.getApplicationContext()!=null)
      name=pc.getApplicationContext().getDefaultCacheName(type);
    Config config=ThreadLocalPageContext.getConfig(pc);
    if(!StringUtil.isEmpty(name)){
      Cache cc = getCache(config, name, null);
      if(cc!=null) return cc;
    }
   
View Full Code Here

TOP

Related Classes of railo.runtime.config.Config

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.