zk.xml详细配置

zk.xml zk配置 zk技术 ajax

 

<?xml version="1.0" encoding="UTF-8"?>

<!-- 
	zk.xml
	Purpose:
		
	Description:
		
	History:
		Sun Mar 26 16:29:07     2006, Created by tomyeh

Copyright (C) 2006 Potix Corporation. All Rights Reserved.
-->

<zk>
	<!-- Turn on if you want to debug JavaScript.
		Once turned on, the uncompressed JavaScript files will be loaded.
	<client-config>
		<debug-js>true</debug-js>
	</client-config>
	-->
	<!--
		The allowed child elements include evaluator-class. 
		At most one xel-config element is allowed for each zk.xml.

	<xel-config>
		<evaluator-class>my.MyExpressionFactory</evaluator-class>
	</xel-config>
	-->
	<!-- Turn on if you want to generate UUID by prefixing ID with the value specified
		here. It is designed for testing purpose.
		Notice ${page will be replaced with page's UUID. If you don't want it,
		remove it.
	<desktop-config>
		<id-to-uuid-prefix>_zid_${page}_</id-to-uuid-prefix>
	</desktop-config>
	-->
	<!-- Turn on if you want to use the same UUID sequence for the desktops
		after reboot. It is mainly for testing purpose.
	<desktop-config>
		<repeat-uuid>true</repeat-uuid>
	</desktop-config>
	-->
	<!--
	<log>
		<description>[Optional] Monitor i3-log.conf and register a handler for the specified log-base</description>
		<log-base>org.zkoss</log-base>
	</log>
	-->

	<!-- Turn on the following if want to use auto as the default.
	
	<library-property>
		<name>org.zkoss.zul.include.mode</name>
		<value>auto</value>
	</library-property>
	-->
	<!-- Turn on if you want to use language addons.
	<language-config>
		<addon-uri>/WEB-INF/lang-addon.xml</addon-uri>
	</language-config>
	-->

	<!-- Turn on if you want to ignore the consecutive click events,
	if it happens too close to the previous one, or the server is still
	serving the previous click.
	<client-config>
		<click-filter-delay>390</click-filter-delay>
	</client-config>
	-->

	<!-- Optional -->
	<!-- Map extensions to the xml language.
		 By default, xml is mapped to xml -->
	<language-mapping>
		<language-name>xml</language-name>
		<extension>svg</extension>
	</language-mapping>
	<language-mapping>
		<language-name>xml</language-name>
		<extension>xml2html</extension>
	</language-mapping>
	<!-- Map extensions to the xul/html language
		 By default, xul/html are mapped to zul and xul.
	<language-mapping>
		<language-name>xul/html</language-name>
		<extension>xxx</extension>
	</language-mapping>
	-->

	<session-config>
		<!-- Turn on the following if you want a different timeout
			Note: The unit is seconds (while that of web.xml is minute)
		<session-timeout>1800</session-timeout>
		-->
		<!-- Turn on the following if you want to reset the session-timeout
		counter when receiving onTimer, like any other request
		In other words, the session is never timeoout if the desktop has
		a timer.
		<timer-keep-alive>true</timer-keep-alive>
		-->
	</session-config>

	<!-- Turn on if you prefer to use the native (Servlet) thread
	to process the events, instead of forking the event processing thread
	<system-config>
		<disable-event-thread/>
	</system-config>
	-->
	<!-- Turn on the following if you want to use ZK with a clustering server
	<system-config>
		<disable-event-thread/>
		<ui-factory-class>org.zkoss.zk.ui.http.SerializableUiFactory</ui-factory-class>
	</system-config>
	-->
	<!-- Turn on the following if you want to cache all desktops in a global
	cache, rather than one for each session
	<system-config>
		<cache-provider-class>org.zkoss.zk.ui.sys.GlobalDesktopCacheProvider</cache-provider-class>
	</system-config>
	-->

	<!--
	<system-config>
		<au-writer-class>my.AuWriter</au-writer-class>
		<cache-provider-class>my.CacheProvider
		</cache-provider-class>
		<disable-event-thread />
		<engine-class>my.UiEngine</engine-class>
		<failover-manager-class>my.FailoverManager
		</failover-manager-class>
		<id-generator-class>my.IdGenerator</id-generator-class>
		<max-spare-threads>100</max-spare-threads>
		<max-suspended-threads>100</max-suspended-threads>
		<max-upload-size>5120</max-upload-size>
		<max-process-time>3000</max-process-time>
		<response-charset>UTF-8</response-charset>
		<session-cache-class>my.SessionCache
		</session-cache-class>
		<upload-charset>UTF-8</upload-charset>
		<upload-charset-finder-class>my.CharsetFinder
		</upload-charset-finder-class>
		<ui-factory-class>my.UiFactory</ui-factory-class>
		<url-encoder-class>my.URLEncoder</url-encoder-class>
		<web-app-class>my.WebApp</web-app-class>
	</system-config>
	-->

	<!-- Optional -->
	<!-- You can define any number of richlets as follows.
		Note: To use richlet, you have to map zkLoader to /xx/* in web.xml,
		where xx could be any name. And, the final URL will be /xx/url-pattern.
		This demo application maps all richlet to /zk (see web.xml),
		so the richlet path will be, say, /zk/test/some
	-->
	<!--
	<richlet>
		<richlet-name>Test</richlet-name>
		<richlet-class>org.zkoss.zkdemo.test.TestRichlet</richlet-class>
		 Any number of initial parameters.
		<init-param>
			<param-name>any</param-name>
			<param-value>any</param-value>
		</init-param>
		
	</richlet>
	
	<richlet-mapping>
		<richlet-name>Test</richlet-name>
		<url-pattern>/test/*</url-pattern>
	</richlet-mapping>
	-->
	<!-- Optional -->
	<!--
		<device-config>
			<device-type>ajax</device-type>
			<timeout-uri>/timeout.zul</timeout-uri>
			 An empty URL can cause the browser to reload the same URL 
		</device-config>
	-->

	<!-- Uncomment if you want to embed JavaScript codes and any other
	tags to be generated inside HTML HEAD.
	<device-config>
		<device-type>ajax</device-type>
		<embed><![CDATA[
	<script type="text/javascript">
	</script>
		]]></embed>
	</device-config>
	-->

	<!-- Optional -->
	<!-- the following listener is used to see # of sessions, desktops...
	-->
	<listener>
		<description>[Optional] Mointor the statistic</description>
		<listener-class>org.zkoss.zk.ui.util.Statistic</listener-class>
	</listener>

	<!-- Configure the error page


	<error-page>
     <device-type>['''ajax'''|mil]</device-type>
     <exception-type>''ClassName''</exception-type>
     <location>''the error page's URI''</location>
	</error-page>

	-->

	<!-- Configure ZUL to use smaller fonts for all locales, and
		smaller fonts for the rest Locales
	<desktop-config>
		<disable-theme-uri>~./zul/css/norm*.css.dsp*</disable-theme-uri>
		<theme-uri>~./zul/css/normsm*.css.dsp*</theme-uri>
	</desktop-config>
	-->
	<!-- Configure ZUL to use larger fonts for all locales, and
		smaller fonts for the rest Locales
	<desktop-config>
		<disable-theme-uri>~./zul/css/norm*.css.dsp*</disable-theme-uri>
		<theme-uri>~./zul/css/normlg*.css.dsp*</theme-uri>
	</desktop-config>
	-->
	<!-- Configure ZUL to use larger fonts for Chinese characters, and
		nomal fonts for the rest Locales
	<desktop-config>
		<disable-theme-uri>~./zul/css/norm*.css.dsp*</disable-theme-uri>
		<theme-uri>~./zul/css/norm**.css.dsp</theme-uri>
	</desktop-config>
	-->
	<!-- Configure additional theme URIs
	<desktop-config>
		<theme-uri>/a.css</theme-uri>
		<theme-uri>/b**.css</theme-uri>
	</desktop-config>
	-->
	<!-- 
	<desktop-config>
	  <theme-provider-class>org.zkoss.zkdemo.userguide.FontSizeThemeProvider</theme-provider-class>
	</desktop-config>
 -->
	<!-- Uncomment the following if you want to redirect to particular
		page when ZK Client receives an error code.
	<client-config>
		<error-reload>
			<error-code>301</error-code>
			<reload-uri>/login.zul</reload-uri>
		</error-reload>
	</client-config>
	-->

	<!-- Uncomment the following to customize the client-polling-based
		server push.
		Note: the unit of PollingServerPush.delay.min and max is second.
		Note: the values of PollingServerPush.start and stop are
		the JavaScript codes to execute at the client.
		Note: the value of PollingServerPush.delay.factor must be integer,
	<preference>
		<name>PollingServerPush.delay.min</name>
		<value>3000</value>
	</preference>
	<preference>
		<name>PollingServerPush.delay.max</name>
		<value>10000</value>
	</preference>
	<preference>
		<name>PollingServerPush.delay.factor</name>
		<value>5</value>
	</preference>
	<preference>
		<name>PollingServerPush.start</name>
		<value></value>
	</preference>
	<preference>
		<name>PollingServerPush.stop</name>
		<value></value>
	</preference>
	-->
	
	<!-- Configure the default font size in ZUL CSS file (norm*.css)
		Default: 12px.
	<library-property>
		<name>org.zkoss.zul.theme.fontSizeM</name>
		<value>12px</value>
	</library-property>
	-->
	<!-- Configure the font size for menus in ZUL CSS file (norm*.css)
		Default: 11px.-->
	<library-property>
		<name>org.zkoss.zul.theme.fontSizeMS</name>
		<value>12px</value>
	</library-property>
	
	<!-- Configure the font size for smaller fonts, such as toolbar,
		 in ZUL CSS file (norm*.css)
		Default: 11px.
	-->
	<library-property>
		<name>org.zkoss.zul.theme.fontSizeS</name>
		<value>12px</value>
	</library-property>
	
	<!-- Configure the font size for extremely small fonts,
		 in ZUL CSS file (norm*.css)
		Default: 10px.
	<library-property>
		<name>org.zkoss.zul.theme.fontSizeXS</name>
		<value>12px</value>
	</library-property>
	-->
	<!-- Configure the font family for titles in ZUL CSS file (norm*.css)
		Default: Verdana, Tahoma, Arial, Helvetica, sans-serif.
	<library-property>
		<name>org.zkoss.zul.theme.fontFamilyT</name>
		<value>Verdana, Tahoma, Arial, Helvetica, sans-serif</value>
	</library-property>
	-->
	<!-- Configure the font family for content in ZUL CSS file (norm*.css)
		Default: Verdana, Tahoma, Arial, serif.
	<library-property>
		<name>org.zkoss.zul.theme.fontFamilyC</name>
		<value>Verdana, Tahoma, Arial, Helvetica, sans-serif</value>
	</library-property>
	-->

	<!-- Configure ZUL not to override the standard HTML tags, such as body's
		margin and padding
	<library-property>
		<name>org.zkoss.zul.theme.browserDefault</name>
		<value>true</value>
	</library-property>
	-->
	<!-- Configure ZUL to apply the zk prefix in the CSS file (norm*.css).
		Use this only if you want to use different fonts for ZK components
		and the rest of your Web pages
	<library-property>
		<name>org.zkoss.zul.theme.enableZKPrefix</name>
		<value>true</value>
	</library-property>
	-->
	
	<!-- Uncommet to control the number of lines to log an error message.
		Default: 6. If nonpostive is specified, the full stack traces are logged.
		Notice that # of lines don't include packages starting with java, javax or sun.
	<library-property>
		<name>org.zkoss.util.logging.realCauseBriefly</name>
		<value>0</value>
	</library-property>
	-->
	<!-- Uncommet to control the number of lines to log a warning message.
		Default: 3. If nonpostive is specified, the full stack traces are logged.
		Notice that # of lines don't include packages starting with java, javax or sun.
	<library-property>
		<name>org.zkoss.util.logging.warningBriefly</name>
		<value>0</value>
	</library-property>
	-->

	<!-- Uncommet to control whether the label propeties files are located.
		Default: /WEB-INF/i3-label.properties
	<library-property>
		<name>org.zkoss.util.label.web.location</name>
		<value>/WEB-INF/i3-label.properties</value>
	</library-property>
	-->
	<!-- Uncommet to control the encoding of the labe properties files
		Default: UTF-8
	<library-property>
		<name>org.zkoss.util.label.web.charset</name>
		<value>UTF-8</value>
	</library-property>
	-->

	<!-- Uncomment it if you prefer to keep the desktops when an user browses to
		another URL or reloads the page.
	<client-config>
		<keep-across-visits>true</keep-across-visits>
	</client-config>
	-->

	<!-- Configure the Hibernate SessionFactory Lifecycle.
	<listener>
		<description>Hibernate SessionFactory Lifecycle</description>
		<listener-class>org.zkoss.zkplus.hibernate.HibernateSessionFactoryListener</listener-class>
	</listener>
	-->
	
	<!-- Configure the Hibernate configuration file name if not "hibernate.cfg.xml"
	<preference>
		<name>HibernateUtil.config</name>
		<value></value>
	</preference>
	-->
	
	<!-- Configure the Hibernate "Open Session In View" Session Lifecycle
	<listener>
		<description>Hibernate "Open Session In View" Session Lifecycle</description>
		<listener-class>org.zkoss.zkplus.hibernate.OpenSessionInViewListener</listener-class>
	</listener>
	 -->

	<!-- Hibernate thread session context handler
	<listener>
		<description>Hibernate thread session context handler</description>
		<listener-class>
			org.zkoss.zkplus.hibernate.HibernateSessionContextListener
		</listener-class>
	</listener>
	 -->	
</zk>
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值