Accessing Java EE Scope Objects

From Documentation
Revision as of 06:12, 1 February 2024 by Hawk (talk | contribs) (→‎getCurrent)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Accessing Java EE Scope Objects



Executions

org.zkoss.zk.ui.Executions

getCurrent

Executions.getCurrent()

Retrieves the current execution which contains HTTP request/response.


get HttpServletRequest

HttpServletRequest req = (HttpServletRequest)Executions.getCurrent().getNativeRequest()

getNativeRequest()

Sessions

org.zkoss.zk.ui.Sessions

Get Current Session

Sessions.getCurrent()

Retrieves the current ZK-wrapped session.

Get HttpSession

HttpSession nativeSession = (HttpSession) Sessions.getCurrent().getNativeSession();



Last Update : 2024/02/01

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.