jakartaee / jakartaee/platform

Add support for registering a custom URLStreamHandler

Open
#428 0 comments 0 reactions 0 assignees View on GitHub
jea-linked
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.