Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "Development/NestedFilesystem" page has been changed by jboynes:
https://wiki.apache.org/tomcat/Development/NestedFilesystem?action=diff&rev1=2&rev2=3

  }}}
  
  == URL Support ==
- TBD
+ URL support is required to allow references to resources to be returned by a 
ClassLoader or ServletContext.
+ To enable Path URIs to be converted to URLs, a !URLStreamHandlerFactory that 
supports the URI's scheme is required. When connecting, the !URLStreamHandler 
can convert the URL to a URI and then to a Path.
  
  == URLClassLoader Support ==
- TBD
+ Classes may be loaded from an archive by converting the Path of its root 
directory to a URL and using a URLClassLoader: {{{
+   Path archivePath = ... ; // path to archive
+   URI archiveURI = new URI("archive", archivePath.toUri().toString(), null, 
null, null);
+   FileSystem archiveFS = FileSystems.newFileSystem(archiveURI, null);
+   URL rootURL = archiveFS.getPath("/").toUri().toURL();
+   ClassLoader loader = new URLClassLoader({rootURL});
+ }}}
  
  == ToDos ==
   * a way to read the zip’s central directory
@@ -92, +99 @@

   * how to use the WatchService to detect changes e.g. web.xml or *.jsp 
touched?
  
  == Performance Measurements ==
+ TBD
  
  = Limitations in standard JDK APIs =
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to