* Returns a JXPathContext bound to the "request" scope. Caches that context
* within the request itself.
*/
public final JXPathContext getRequestContext() {
Request request = ObjectModelHelper.getRequest(objectModel);
JXPathContext context = (JXPathContext) request.getAttribute(Constants.JXPATH_CONTEXT);
if (context == null) {
Context cocoonContext = ObjectModelHelper.getContext(objectModel);
JXPathContext parentContext = null;
Session session = request.getSession(false);
if (session != null) {
parentContext = getSessionContext(session, cocoonContext);
} else {
parentContext = getApplicationContext(cocoonContext);