src/main/java/js/net/EventStreamServlet.java
private static String getEventStreamSessionID(String requestPath) {
		int extensionSeparator = requestPath.lastIndexOf('.');
		if (extensionSeparator == -1) {
			extensionSeparator = requestPath.length();
		}

		// request URI is guaranteed to start with path separator
		// anyway, if missing below pathSeparator will be -1 + 1 = 0, pointing to entire request URI
		int pathSeparator = requestPath.lastIndexOf('/', extensionSeparator) + 1;
		return requestPath.substring(pathSeparator, extensionSeparator);
	}
private static String getEventStreamSessionID(String requestPath) {
		int extensionSeparator = requestPath.lastIndexOf('.');
		if (extensionSeparator == -1) {
			extensionSeparator = requestPath.length();
		}

		// request URI is guaranteed to start with path separator
		// anyway, if missing below pathSeparator will be -1 + 1 = 0, pointing to entire request URI
		int pathSeparator = requestPath.lastIndexOf('/', extensionSeparator) + 1;
		return requestPath.substring(pathSeparator, extensionSeparator);
	}
Extract event stream session ID from request path. This method extracts last path component from request path with
extension removed, if present. It is a sort of <code>basename</code> from file path. All next request paths with return
the same session ID, <code>1234</code>:
<ul>
<li>/1234.event,
<li>/event/1234,
<li>/1234,
<li>/admin/1234.event
<li>/admin/event/1234
</ul>
This allows for flexible event stream servlet mapping on deployment descriptor. Both mapping by path and extension can be
used. Also extension can be anything. Anyway, this flexibility comes with a constraint: session ID cannot contain slash
(/) or dot (.).
<p>
Session ID is generated by event stream manager when client subscribes, see
{@link EventStreamManager#subscribe(EventStreamConfig)}, then client sends session ID back to this servlet, as a HTTP
request.

@param requestPath request path, not null and with leading path separator.
@return event stream session ID, never null.