摘自:Pro Wicket
Modify the label User Name to User Name1 in Login.html and refresh the page; you will notice
the template now displays User Name1. Essentially, any change to the template is reflected in
the subsequent page access. Wicket checks for any changes to a template file and loads the
new one if it indeed has been modified. This is of great help during the development phase.
But you probably wouldn’t be looking for this default “feature” when deploying in production,
as it may lead to the application performing slowly.
大概意思是:
当选择Development模式时候,方便开发的,修改过后不需要重新编译,但是会影响性能,而deployment模式不方便开发,但是部署的时候还是要选择这个的。
修改:
修改web.xml
Modify the label User Name to User Name1 in Login.html and refresh the page; you will notice
the template now displays User Name1. Essentially, any change to the template is reflected in
the subsequent page access. Wicket checks for any changes to a template file and loads the
new one if it indeed has been modified. This is of great help during the development phase.
But you probably wouldn’t be looking for this default “feature” when deploying in production,
as it may lead to the application performing slowly.
大概意思是:
当选择Development模式时候,方便开发的,修改过后不需要重新编译,但是会影响性能,而deployment模式不方便开发,但是部署的时候还是要选择这个的。
修改:
修改web.xml
<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>Wicket Web Application</display-name>
<filter>
<filter-name>wicket.wicketTest</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
<param-name>applicationClassName</param-name>
<param-value>com.yy.MyApplication</param-value>
</init-param>
<init-param>
<param-name>configuration</param-name>
<!-- <param-value>development</param-value>-->
<param-value>deployment</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>wicket.wicketTest</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
本文介绍了Wicket框架中模板更新的工作原理。在开发模式下,任何对模板文件的更改都会被立即反映到页面上,无需重新编译,这有助于提高开发效率但可能影响性能。而在部署模式下,虽然不支持这种即时更新的功能,但更适合生产环境使用。
831

被折叠的 条评论
为什么被折叠?



