{
log.debug( ">>> Begin JSF request for " + getRequestPath(externalContext) );
Contexts.eventContext.set( new EventContext( externalContext.getRequestMap() ) );
Contexts.applicationContext.set( new ApplicationContext( externalContext.getApplicationMap() ) );
Contexts.sessionContext.set( new SessionContext( externalContext.getSessionMap() ) );
Session session = Session.getInstance();
if ( session!=null && session.isInvalidDueToNewScheme( Pages.instance().getRequestScheme( FacesContext.getCurrentInstance() ) ) )
{
invalidateSession(externalContext);
}
Contexts.conversationContext.set(null); //in case endRequest() was never called
//Events.instance(); //TODO: only for now, until we have a way to do EL outside of JSF!