ZK Resource Engine"

From Documentation
m (correct highlight (via JWB))
 
(5 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
=DHtmlResourceServlet=
 
=DHtmlResourceServlet=
  [Required] Class: <javadoc> org.zkoss.zk.au.http.DHtmlResourceServlet</javadoc>
+
  [Optional] Class: <javadoc> org.zkoss.zk.au.http.DHtmlResourceServlet</javadoc>
  
Since 9.5.0
+
{{versionSince| 9.5.0}}
  
ZK Resource Engine, it is a servlet that handles static resources (wpd, wcs).
+
ZK Resource Engine, it is a servlet that handles static resources. After you configure this servlet, ZK will retrieve its own static resources (including wpd, wcs, dsp, and images) with the specified URL pattern. Without this servlet, ZK retrieves by requesting <code>/zkau</code>.
 
 
Notice that the URL pattern mapped to this engine must be consistent with the <tt>resource-uri</tt> parameter of [[ZK_Configuration_Reference/web.xml/ZK_Loader|ZK Loader]].
 
 
 
=Map URL to ZK Resource Engine=
 
  
 
Mapping URL to ZK Resource Engine is straightforward:
 
Mapping URL to ZK Resource Engine is straightforward:
Line 25: Line 21:
 
</source>
 
</source>
  
Notice that the URL pattern mapped to this engine must be consistent with the <tt>resource-uri</tt> parameter of [[ZK_Configuration_Reference/web.xml/ZK_Loader|ZK Loader]].
+
Notice that the URL pattern mapped to this engine must be consistent with the <code>resource-uri</code> parameter of [[ZK_Configuration_Reference/web.xml/ZK_Loader|ZK Loader]].
 
 
Here is [[ZK_Configuration_Reference/web.xml/Sample_of_web.xml|a complete sample]].
 
  
 
=Version History=
 
=Version History=

Latest revision as of 10:18, 19 January 2022


ZK Resource Engine


DHtmlResourceServlet

[Optional] Class: DHtmlResourceServlet

Since 9.5.0

ZK Resource Engine, it is a servlet that handles static resources. After you configure this servlet, ZK will retrieve its own static resources (including wpd, wcs, dsp, and images) with the specified URL pattern. Without this servlet, ZK retrieves by requesting /zkau.

Mapping URL to ZK Resource Engine is straightforward:

	<servlet>
		<servlet-name>resourceEngine</servlet-name>
		<servlet-class>org.zkoss.zk.au.http.DHtmlResourceServlet</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>resourceEngine</servlet-name>
		<url-pattern>/zkres/*</url-pattern>
	</servlet-mapping>

Notice that the URL pattern mapped to this engine must be consistent with the resource-uri parameter of ZK Loader.

Version History

Version Date Content
9.5.0 09/29/20



Last Update : 2022/01/19

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