官方文档说明:
ZK Developer's Reference文档,章节为Minimize Number of JavaScript Files to Load,按照文档步骤执行,最后需在
web.xml中添加servlet,
<servlet> <servlet-name>dspLoader</servlet-name> <servlet-class>org.zkoss.web.servlet.dsp.InterpreterServlet</servlet-class> <init-param> <param-name>class-resource</param-name> <param-value>true</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>dspLoader</servlet-name> <url-pattern>*.dsp</url-pattern> </servlet-mapping>
未配置前的加载js文件:
配置后加载js文件: