Open
Description
Because URL.setURLStreamHandlerFactory(x)
can called only once this method can't use from an application inside of an application server.
Also the service loading via com.inet.lib.io.URLProtocolManagerURLStreamHandlerProvider
does not work because the application is not on the root classpath.
There already different proprietary solution in different application servers for registering a custom URLStreamHandler
.
There should be a standard solution.
It can be a method ServletContext like:
public void addURLStreamHandler( String protocol, URLStreamHandler handler )
or
public void addURLStreamHandlerFactory( URLStreamHandlerFactory factory )
There can be also an entry in the web.xml
to register it declarative.