src/main/java/js/servlet/RequestContext.java
public HttpSession getSession(boolean... create) {
		assertAttached();
		if (create.length == 0) {
			return httpRequest.getSession();
		}
		// if create flag is true next call can throw IllegalStateException if HTTP response is committed
		return httpRequest.getSession(create[0]);
	}
public HttpSession getSession(boolean... create) {
		assertAttached();
		if (create.length == 0) {
			return httpRequest.getSession();
		}
		// if create flag is true next call can throw IllegalStateException if HTTP response is committed
		return httpRequest.getSession(create[0]);
	}
Get HTTP session this request context is part of or null if session is not or could not be created. If
<code>create</code> flag is not provided this method return current HTTP session as it is, that is, return it if already
created or null if not.
<p>
If <code>create</code> flag is present and is true this method returns current HTTP session, if there is one associated
with current request, or create a new one. This method never returns null if requested to create session but can throw
illegal state exception if attempt to create session after response commit.

@param create optional create flag.
@return current HTTP session possible null.
@throws IllegalStateException if attempt to create new HTTP session after response was committed.
@throws BugError if attempt to use this getter on instance not attached to a HTTP servlet request.