ZK Loader"
Maya001122 (talk | contribs) m |
m |
||
Line 14: | Line 14: | ||
</source> | </source> | ||
− | It is suggested to map this servlet to the <tt>zul</tt> and <tt>zhtml</tt> extensions as shown | + | It is suggested to map this servlet to the <tt>zul</tt> and <tt>zhtml</tt> extensions as shown below. It is OK if you want to map <tt>xul</tt> and <tt>html</tt>, too. |
− | == The Initial Parameters | + | <source lang="xml" > |
+ | <servlet> | ||
+ | <description>ZK loader for evaluating ZUML pages</description> | ||
+ | <servlet-name>zkLoader</servlet-name> | ||
+ | <servlet-class>org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class> | ||
+ | <init-param> | ||
+ | <param-name>update-uri</param-name> | ||
+ | <param-value>/zkau</param-value> | ||
+ | </init-param> | ||
+ | <load-on-startup>1</load-on-startup><!-- MUST --> | ||
+ | </servlet> | ||
+ | <servlet-mapping> | ||
+ | <servlet-name>zkLoader</servlet-name> | ||
+ | <url-pattern>*.zul</url-pattern> | ||
+ | </servlet-mapping> | ||
+ | <servlet-mapping> | ||
+ | <servlet-name>zkLoader</servlet-name> | ||
+ | <url-pattern>*.zhtml</url-pattern> | ||
+ | </servlet-mapping> | ||
+ | </source> | ||
+ | |||
+ | = The Initial Parameters = | ||
{| border="1" | {| border="1" | ||
Line 52: | Line 73: | ||
|} | |} | ||
− | + | =Version History= | |
{| border='1px' | width="100%" | {| border='1px' | width="100%" |
Revision as of 07:12, 2 November 2010
Location: WEB-INF/web.xml
[Required] Class: DHtmlLayoutServlet
DHtmlLayoutServlet is a servlet used to load ZUML pages when the Web server receives URL requests sent by users.
Notice that you must specify load-on-startup since many other servlets depend on the ZK loader.
<load-on-startup>1</load-on-startup>
It is suggested to map this servlet to the zul and zhtml extensions as shown below. It is OK if you want to map xul and html, too.
<servlet>
<description>ZK loader for evaluating ZUML pages</description>
<servlet-name>zkLoader</servlet-name>
<servlet-class>org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class>
<init-param>
<param-name>update-uri</param-name>
<param-value>/zkau</param-value>
</init-param>
<load-on-startup>1</load-on-startup><!-- MUST -->
</servlet>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>*.zul</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>*.zhtml</url-pattern>
</servlet-mapping>
The Initial Parameters
update-uri | [Required]
For example, if the ZK AU engine is mapped to /zkau/*, by use of servlet-mapping, then specify /zkau for this parameter. Note: if the servlet container is used with other Web server, like Apache, you have to map this update URI to the servlet container (in additions to zul and zhtml files). |
compress | [Optional][Default:true]
|
log-level | [Optional]
It specifies the default log level for org.zkoss. If not specified, the system default (usually INFO) is used. Possible values: OFF, ERROR, WARNING, INFO, DEBUG and FINER. Refer to the Beyond ZK chapter in the Developer's Guide. |
Version History
Version | Date | Content |
---|---|---|