It is designed to make the signature of XEL functions (see org.zkoss.web.fn.ServletFns ) simpler. For example, org.zkoss.web.fn.ServletFns.isExplorer requires no argument, since it assumes the current context can be retrieved from RequestContexts.getCurrent .
Spec Issue: It is controversial whether the introduction of RequestContext and RequestContexts is worth. However, we have to maintain the backward compatibility of the XEL/EL function signatures. author: tomyehsince: 3.0.0
However, you don't need to invoke this method if you are using DSP. See Also: RequestContexts.push
However, you don't need to invoke this method if you are using DSP.
Note: you must use try/finally as follows:
RequestContexts.push(jc); try { ... } finally { RequestContexts.pop(); }