Information about Request and Execution"

From Documentation
(Created page with '{{ZKDevelopersGuidePageHeader}} An execution of a client request (e.g., ServletRequest). When a request sent from a client, the server constructs a Execution object to hold exe…')
 
m (correct highlight (via JWB))
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
 
A client request, e.g., HttpServletRequest, might consist of multiple ZK request (AuRequest). However, these ZK requests must target the same desktop of pages (Page).  
 
A client request, e.g., HttpServletRequest, might consist of multiple ZK request (AuRequest). However, these ZK requests must target the same desktop of pages (Page).  
  
The <tt>org.zkoss.zk.ui.Execution</tt> interface provides information about the current execution, such as the request parameters. To get the current execution, you could simply use the <tt>getCurrent</tt> method in the <tt>org.zkoss.zk.ui.Executions</tt> class. It's a static class.
+
The <javadoc type="interface">org.zkoss.zk.ui.Execution</javadoc> interface provides information about the current execution, such as the request parameters. To get the current execution, you could simply use the <code>getCurrent</code> method in the <javadoc>org.zkoss.zk.ui.Executions</javadoc> class. It's a static class.
  
 
The following example will show the server name.
 
The following example will show the server name.

Latest revision as of 10:36, 19 January 2022

Information about Request and Execution


Stop.png This documentation is for an older version of ZK. For the latest one, please click here.


An execution of a client request (e.g., ServletRequest). When a request sent from a client, the server constructs a Execution object to hold execution relevant info, and then serves the request through this execution.

A client request, e.g., HttpServletRequest, might consist of multiple ZK request (AuRequest). However, these ZK requests must target the same desktop of pages (Page).

The Execution interface provides information about the current execution, such as the request parameters. To get the current execution, you could simply use the getCurrent method in the Executions class. It's a static class.

The following example will show the server name.

<window>
	<zscript>
		String sn = Executions.getCurrent().getServerName();
	</zscript>
	The server is: ${sn}
</window>



Last Update : 2022/01/19

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