欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Development 和 Deployment Mode wicketdevelopmentdeployment 

程序员文章站 2022-03-09 14:01:19
...
摘自: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
<?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>