public abstract class URLStreamHandlerWithContext
A base-class for URLStreamHandlers that need a context for the URL whose
connection is to be opened.
It is implemented by adding a user context id to the URL in the userInfo section.
The context id should remain unchanged while the user edits a document. The user context
contains information about the cookies and HTTP headers sent by the user.
For openConnection calls, the context id passed along. You can use it to retrieve information
about the user on behalf of which the request is made.
This method has the same purpose as openConnection() in a standard URLConnection
except that the context is also passed in.
If the connection, or one of the following IO operations on it need some
user interaction like providing credentials, they should throw an
IOException that also implements the UserActionRequiredException.
The message of the IOException will still be rendered in different places,
but the instance of WebappMessage found in the UserActionRequiredException
will be used to present an authentication dialog to the users. This message
If no JS handler is registered, the message will just be displayed in the