src/main/java/js/servlet/RequestContext.java
public void attach(HttpServletRequest httpRequest, HttpServletResponse httpResponse) {
		// takes care to not override request URL, locale and request path values if set by request pre-processor
		if (requestURL == null) {
			requestURL = httpRequest.getRequestURI();
		}
		if (locale == null) {
			locale = httpRequest.getLocale();
		}
		if (requestPath == null) {
			// request URI and context path cannot ever be null
			requestPath = httpRequest.getRequestURI().substring(httpRequest.getContextPath().length());
		}

		this.httpRequest = httpRequest;
		this.httpResponse = httpResponse;
		this.attached = true;
	}
public void attach(HttpServletRequest httpRequest, HttpServletResponse httpResponse) {
		// takes care to not override request URL, locale and request path values if set by request pre-processor
		if (requestURL == null) {
			requestURL = httpRequest.getRequestURI();
		}
		if (locale == null) {
			locale = httpRequest.getLocale();
		}
		if (requestPath == null) {
			// request URI and context path cannot ever be null
			requestPath = httpRequest.getRequestURI().substring(httpRequest.getContextPath().length());
		}

		this.httpRequest = httpRequest;
		this.httpResponse = httpResponse;
		this.attached = true;
	}
Attach this instance to HTTP servlet request. Load this instance state from HTTP servlet request and mark it as attached.

@param httpRequest current HTTP request object,
@param httpResponse HTTP response object associated to current request.