Package jfun.yan.util.resource

Examples of jfun.yan.util.resource.ResourceLoader


    return ResourceLoaders.or(cloader, interpreter.getResourceLoader());
  }
  private void loadNuts(ClassLoader loader,
      String resource, Map nuts)
  throws IOException, ClassNotFoundException, IntrospectionException{
    final ResourceLoader rloader = getResourceLoader(loader);
    final InputStream in = rloader.getResourceAsStream(resource);
    if(in == null)
      throw new IllegalStateException("could not find "
        + resource);
    try{
      final Properties props = new Properties();
View Full Code Here


      ctxt.log(CONFIG_FILE_PARAM
          +" not specified, looking for default "+DEFAULT_CONFIG_FILE);
      config_file = DEFAULT_CONFIG_FILE;
    }

    final ResourceLoader rloader = new ServletContextResourceLoader(ctxt,
        new ClassLoader2ResourceLoader(cloader));
    final InputStream in = rloader.getResourceAsStream(config_file);
    if(in == null){
      ctxt.log("yan configuration file "+config_file+" not found.");
      return null;
    }
    try{
      final NutsProcessor proc = getNutsProcessor(cloader, rloader, ctxt);
      proc.process(rloader.getResource(config_file), in);
      registerServletContext(proc.getContainer(), ctxt);
      return proc;
    }
    finally{
      in.close();
View Full Code Here

TOP

Related Classes of jfun.yan.util.resource.ResourceLoader

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.