A
URLStreamHandlerService for webbundle scheme.
It is responsible for not only adding necessary OSGi headers to transform a plain
vanilla web app to a Web App Bundle (WAB), but also setting appropriate
parameters in the URL object to meet spec's requirement as described below:
The java.net.URL object for a webbundle URL must return the String webbundle
when the getProtocol method is called. The embedded URL must be returned in
full from the getPath method. The parameters for processing manifest must
be returned from the getQuery() method.
Some form of embedded URL also contain query parameters and this must be
supported. Thus the value returned from getPath may contain a URL query.
Any implementation must take care to preserve both the query parameters for
the embedded URL as well as the webbundle URL. A question mark must
always follow the embedded URL to simplify this processing. The following example shows
an HTTP URL with some query parameter:
webbundle:https://localhost:1234/some/path/?war=example.war?Web-ContextPath=/foo
In this case getPath method of the webbundle URL must return:
https://localhost:1234/some/path/?war=example.war
All the parameters in the webbundle: URL are optional except for the Web-ContextPath parameter.
The parameter names are case insensitive, but their values must be treated as case sensitive.
Since Web-ContextPath url parameter is mandatory, the query component can never be empty:
webbundle:http://www.acme.com:8021/sales.war?