sunflowers 发表于 2013-2-7 22:25:53

zk.xml详细配置

zk.xml zk配置 zk技术 ajax
 

<?xml version="1.0" encoding="UTF-8"?><!-- zk.xmlPurpose:Description:History:Sun Mar 26 16:29:07   2006, Created by tomyehCopyright (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 specifiedhere. 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 desktopsafter reboot. It is mainly for testing purpose.<desktop-config><repeat-uuid>true</repeat-uuid></desktop-config>--><!--<log><description> 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 stillserving 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 timeoutNote: 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-timeoutcounter when receiving onTimer, like any other requestIn other words, the session is never timeoout if the desktop hasa timer.<timer-keep-alive>true</timer-keep-alive>--></session-config><!-- Turn on if you prefer to use the native (Servlet) threadto 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 globalcache, 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 othertags to be generated inside HTML HEAD.<device-config><device-type>ajax</device-type><embed><!]></embed></device-config>--><!-- Optional --><!-- the following listener is used to see # of sessions, desktops...--><listener><description> 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, andsmaller 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, andsmaller 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, andnomal 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 particularpage 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-basedserver push.Note: the unit of PollingServerPush.delay.min and max is second.Note: the values of PollingServerPush.start and stop arethe 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'smargin 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 componentsand 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 filesDefault: 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 toanother 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>
页: [1]
查看完整版本: zk.xml详细配置