// MarinerPageContext has been allocated but before it has been
// initialised as this is needed during the initialisation.
environmentContext.initialise(context);
environmentContext.initialiseSession();
ExpressionContext exprContext =
environmentContext.getExpressionContext();
// If there is an expression context then it must have been associated
// with an enclosing request context since we are still initialising
// this instance of MarinerServletRequestContext. We now must associate
// the expression context with this MarinerServletRequestContext.
//
// An expression context can be associated with more than one request
// context, although not concurrently. When the request context is no
// longer needed, the expression context (if any) should be reset to
// the enclosing request context.
if (exprContext == null) {
ExpressionSupport.createExpressionEnv(this,
volantisBean, environmentContext,
context.getDevicePolicyAccessor());
} else {
exprContext.setProperty(MarinerRequestContext.class, this,
false);
}
ContextInternals.setEnvironmentContext(this, environmentContext);