jakartaee / jakartaee/platform
Add support for registering a custom URLStreamHandler
- Dominant language
- No language data
- Stars
- 230
- Forks
- 77
- Avg merge
- 8d 5h
- Merged PRs (30d)
- 1
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.
https://github.com/eclipse-ee4j/servlet-api/issues/432
[AB#73](https://dev.azure.com/jakarta-ee-azdo/7cf9a9d3-9854-41e0-9a66-99506a9ed874/_workitems/edit/73)
Contributor guide
Research direction
Start with the linked Servlet API issue #432 and review the proposed ServletContext and web.xml registration approaches described here. Done means the project has agreed on and specified a standard way to register custom URLStreamHandlers for application-server deployments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100