-
Notifications
You must be signed in to change notification settings - Fork 7
java servlet 使用
luyongfugx edited this page Sep 29, 2013
·
6 revisions
使用com.storeinc.StoreIncServlet来自动生成增量更新包
1.com.storeinc.StoreIncServlet 依赖fastjson包 2.在web.xml加入:
<servlet>
`<display-name>StoreIncServlet</display-name>`
`<servlet-name>StoreIncServlet</servlet-name>`
`<servlet-class>com.storeinc.StoreIncServlet</servlet-class>`
<init-param>
<param-name>jsPath</param-name>
<param-value>/Users/waynelu/storeinc/demo/static/hello/dist/</param-value>
`</init-param> `
`<init-param> `
`<param-name>chunkSize</param-name>`
<param-value>12</param-value>
</init-param>
</servlet>
<servlet-mapping>
`<servlet-name>StoreIncServlet</servlet-name>`
`<url-pattern>/storeinc/*</url-pattern>`
</servlet-mapping>
jsPath:是js存放路径 chunkSize是增量更新块大小
然后访问:http://localhost:8080/testweb/storeinc/main-1.0.6_1.0.7.js 可以得到1.0.6和1.0.7之间的增量文件