Configuration"

From Documentation
m (correct highlight (via JWB))
 
(2 intermediate revisions by one other user not shown)
Line 2: Line 2:
  
 
=== WEB-INF/portlet.xml ===
 
=== WEB-INF/portlet.xml ===
To use it, you first have to add the following definition into <tt>WEB-INF/portlet.xml</tt>. Notice that <tt>expiration-cache</tt> must be set to zero to prevent portals from caching the result.
+
To use it, you first have to add the following definition into <code>WEB-INF/portlet.xml</code>. Notice that <code>expiration-cache</code> must be set to zero to prevent portals from caching the result.
  
 
<source lang="xml" >
 
<source lang="xml" >
Line 30: Line 30:
  
 
=== WEB-INF/web.xml ===
 
=== WEB-INF/web.xml ===
ZK portlet loader actually delegates the loading of ZUML pages to ZK loader (<javadoc type="interface">org.zkoss.zk.ui.http.DHtmlLayoutServlet</javadoc>). Thus, you have to configure <tt>WEB-INF/web.xml</tt> as specified in '''Appendix A''' in '''the Developer's Reference''', even if you want to use only portlets.
+
ZK portlet loader actually delegates the loading of ZUML pages to ZK loader (<javadoc>org.zkoss.zk.ui.http.DHtmlLayoutServlet</javadoc>). Thus, you have to configure <code>WEB-INF/web.xml</code> as specified in [http://books.zkoss.org/wiki/ZK_Configuration_Reference ZK Configuration Reference], even if you want to use only portlets.
  
 
{{ ZKDevelopersGuidePageFooter}}
 
{{ ZKDevelopersGuidePageFooter}}

Latest revision as of 10:41, 19 January 2022

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


WEB-INF/portlet.xml

To use it, you first have to add the following definition into WEB-INF/portlet.xml. Notice that expiration-cache must be set to zero to prevent portals from caching the result.

 <portlet>
     <description>ZK loader for ZUML pages</description>
     <portlet-name>zkPortletLoader</portlet-name>
     <display-name>ZK Portlet Loader</display-name>

     <portlet-class>org.zkoss.zk.ui.http.DHtmlLayoutPortlet</portlet-class>

     <expiration-cache>0</expiration-cache>

     <supports>
         <mime-type>text/html</mime-type>
         <portlet-mode>VIEW</portlet-mode>
     </supports>

     <supported-locale>en</supported-locale>

     <portlet-info>
         <title>ZK</title>
         <short-title>ZK</short-title>
         <keywords>ZK,ZUML</keywords>
     </portlet-info>
 </portlet>

WEB-INF/web.xml

ZK portlet loader actually delegates the loading of ZUML pages to ZK loader (DHtmlLayoutServlet). Thus, you have to configure WEB-INF/web.xml as specified in ZK Configuration Reference, even if you want to use only portlets.



Last Update : 2022/01/19

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