Package railo.runtime

Examples of railo.runtime.PageSource


    String requestURI=realPath,queryString=null;
    if((index=realPath.indexOf('?'))!=-1){
      requestURI=realPath.substring(0,index);
      queryString=realPath.substring(index+1);
    }
    PageSource ps = PageSourceImpl.best(((PageContextImpl)pc).getRelativePageSources(requestURI));
    requestURI=ps.getFullRealpath();
    if(queryString!=null) return requestURI+"?"+queryString;
    return requestURI;
  }
View Full Code Here


   
       
    // Second Change     
    if(textTagLib.startsWith("/")){
            //config.getPhysical(textTagLib);
        PageSource ps = ((ConfigImpl)config).getPageSourceExisting(null,null,textTagLib,false,false,true,false);
       
        //config.getConfigDir()
        if(ps!=null) {
            if(ps.physcalExists()) {
              Resource file = ps.getPhyscalFile();
          // TLD
              if(file.isFile()) return _executeTLD(config,file,nameSpace,nameSpaceSeparator,cfml);
            }
        // CTD
        if(!hasTldExtension)return _executeCTD(textTagLib,nameSpace,nameSpaceSeparator);
View Full Code Here

    else if(res.isFile()){
      if(!res.getName().equalsIgnoreCase(Constants.APP_CFC))  {
        try {
         
          // MUST still a bad solution
          PageSource ps = pc.toPageSource(res,null);
          if(ps==null || ps.getComponentName().indexOf("..")!=-1) {
            PageSource ps2=null;
            Resource root = cfclocation.getPhysical();
                    String path = ResourceUtil.getPathToChild(res, root);
                    if(!Util.isEmpty(path,true)) {
                      ps2=cfclocation.getPageSource(path);
                    }
View Full Code Here

  private String toPath(Resource res) {
      if(!(res instanceof FileResource)) return res.getAbsolutePath();
     
      //Config config=pageContext.getConfig();
      PageSource ps = pageContext.toPageSource(res,null);
      if(ps==null) return res.getAbsolutePath();
     
      String realPath = ps.getRealpath();
      realPath=realPath.replace('\\', '/');
      if(realPath.endsWith("/"))realPath=realPath.substring(0,realPath.length()-1);
     
      //print.out("real:"+realPath);
      String mapping=ps.getMapping().getVirtual();
      mapping=mapping.replace('\\', '/');
      if(mapping.endsWith("/"))mapping=mapping.substring(0,mapping.length()-1);
     
      return mapping+realPath;
   
View Full Code Here

    PageContextImpl pc = (PageContextImpl) ThreadLocalPageContext.get();
    String template="";
    StackTraceElement trace=null;
    List list=new ArrayList();
    Resource res;
    PageSource ps;
    FDStackFrameImpl frame;
   
   
    for(int i=traces.length-1;i>=0;i--) {
      trace=traces[i];
View Full Code Here

    StackTraceElement[] traces = pc.getThread().getStackTrace();
    String template="";
    StackTraceElement trace=null;
    ArrayList list=new ArrayList();
    Resource res;
    PageSource ps;
    int index=stack.size();
    for(int i=traces.length-1;i>=0;i--) {
      trace=traces[i];
      ps=null;
      if(trace.getLineNumber()<=0) continue;
      template=trace.getFileName();
      if(template==null || ResourceUtil.getExtension(template,"").equals("java")) continue;
     
      if(index>0)ps=(PageSource) stack.get(--index);
      // inside the if is the old way, that only work when the cfm is inside the mapping, but i'm not shure woth the new way
      if(ps==null || !(ps.getFullClassName().equals(trace.getClassName()) && ps.getDisplayPath().equals(template))){
        res = ResourceUtil.toResourceNotExisting(pc, template);
        ps = pc.toPageSource(res, null);
      }
     
      FDStackFrameImpl frame = new FDStackFrameImpl(this,pc,trace,ps);
View Full Code Here

    return getTopStackFrame();
  }
 
  @Override
    public IFDStackFrame getTopStackFrame(){
    PageSource ps = pc.getCurrentPageSource();
   
    StackTraceElement[] traces = pc.getThread().getStackTrace();
    String template="";
    StackTraceElement trace=null;
    Resource res;
   
    for(int i=0;i<traces.length;i++) {
      trace=traces[i];
      if(trace.getLineNumber()<=0) continue;
      template=trace.getFileName();
      if(template==null || ResourceUtil.getExtension(template,"").equals("java")) continue;
     
      if(ps==null || !(ps.getFullClassName().equals(trace.getClassName()) && ps.getResource().getAbsolutePath().equals(template))){
        res = ResourceUtil.toResourceNotExisting(pc, template);
        ps = pc.toPageSource(res, null);
      }
      break;
    }
View Full Code Here

      if(ac==null) ac= pc.getApplicationContext();
     
      // abs path
      if(path.startsWith("/")){
        ConfigWebImpl cwi=(ConfigWebImpl) config;
        PageSource ps = cwi.getPageSourceExisting(
            pc, ac==null?null:ac.getMappings(), path, false, false, true, false);
        //res=cwi.getPhysicalResourceExistingX(
        //    pc,
        //    ac==null?null:ac.getMappings(), path,
        //    false, false, true);
        if(ps!=null){
          res=ps.getResource();
          if(res!=null && (!onlyDir || res.isDirectory())) return res;
        }
       
      }
      // real path
View Full Code Here

    server.registerTypeMapping(clazz);
    registerTypeMapping(server,clazz);
  }

  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();
View Full Code Here

       
    pc.setFunctionScopes(newLocal,newArgs);
    pci.setActiveUDFCalledName(calledName);
   
    int oldCheckArgs=undefined.setMode(properties.localMode==null?pc.getApplicationContext().getLocalMode():properties.localMode.intValue());
    PageSource psInc=null;
    try {
      PageSource ps = getPageSource();
      if(doIncludePath)psInc = ps;
      //if(!ps.getDisplayPath().endsWith("Dump.cfc"))print.e(getPageSource().getDisplayPath());
      if(doIncludePath && getOwnerComponent()!=null) {
        //if(!ps.getDisplayPath().endsWith("Dump.cfc"))print.ds(ps.getDisplayPath());
        psInc=ComponentUtil.getPageSource(getOwnerComponent());
View Full Code Here

TOP

Related Classes of railo.runtime.PageSource

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.