if(var == null) throw new XPathException("No request object found in the current XQuery context.");
	public Sequence eval(Sequence[] args, Sequence contextSequence)		throws XPathException {		RequestModule myModule = (RequestModule)context.getModule(RequestModule.NAMESPACE_URI);				// request object is read from global variable $request		Variable var = 			myModule.resolveVariable(RequestModule.REQUEST_VAR);		if (var.getValue().getItemType() != Type.JAVA_OBJECT)			throw new XPathException("Variable $request is not bound to an Java object.");		JavaObjectValue value = (JavaObjectValue) var.getValue().itemAt(0);		if(value.getObject() instanceof RequestWrapper) {			SessionWrapper session = 				((RequestWrapper) value.getObject()).getSession(true);			myModule.declareVariable(RequestModule.SESSION_VAR, session);		} else			throw new XPathException("Variable $request is not bound to a Request object.");		return Sequence.EMPTY_SEQUENCE;	}