1. webwork.xml中定义的pachage允许定义继承关系,比如package A继承package B ,那么A 可以使用B中所有的actions、results和interceptors,而无需单独定义。
2. webwork.xml中可以使用<include>标记,引入其他配置文件,这样就可以将多模块分开,如:
<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN" "http://www.opensymphony.com/xwork/xwork-1.0.dtd"> <xwork> <package name="secure" extends="default" namespace="/secure"> <interceptor-stack name="default"> <interceptor-ref name="auth"/> <interceptor-ref name="completeStack"/> </interceptor-stack> <default-interceptor-ref name="default"/> <!-- protected actions --> </package> </xwork> |
配置中的先后顺序有关系。
3. 一些基本的配置文字被包含在webwork-default.xml文件中,可以直接引用。
4. webwork.properties设置
Property Default Value Description
webwork.locale none Default locale to use for i18n. (See chapter 14.)
webwork.i18n.encoding ISO-8859-1 WebWork’s character encoding set.
webwork.multipart.parser pell Used for file upload support. Possible values are
pell, cos, and jakarta . Although not yet the
default, jakarta is highly recommended. (See
chapter 4.)
webwork.multipart.saveDir none Directory in which temporary uploaded files are
stored. By default, this value is the temp directory
associated with your web application by the servlet
container.
webwork.multipart.maxSize 2097152 Maximum size of allowed uploaded files (in
bytes).
webwork.custom.properties none Other properties files to load in addition to webwork.
properties. Useful if you’re making packaged
applications that are designed to be customized.
webwork.action.extension action Mapping extension used in web.xml.
webwork.tag.altSyntax false When set to true, WebWork’s JSP tags use the
new alternative syntax that is set to become standard
in WebWork 2.2. In this book, altSyntax is
assumed to be set to true.
webwork.ui.theme xhtml Default UI tag theme to use. (See chapter 11.)
webwork.ui.templateDir template Directory and/or classpath location to search for
UI tag themes.
webwork.ui.templateSuffix vm Suffix in which the UI templates are implemented.
webwork.configuration.xml.reload false When set to true, WebWork checks configuration
files to see if they need to be reloaded. This setting
is helpful for development and debugging.
webwork.velocity.configfile velocity.properties Where to look for Velocity-related configuration.
5. 实现actionSupport接口的action可以直接调用validate()方法,因为ActionSupport接口直接继承了 Validateable接口,这样在执行execute方法前会首先调用validate()方法。.
6.操!今天忙活了大半天,才得出以下结论:
在使用action的ModelDriven时,action中的domain Object必须是私有的(即private,否则将得不到request中的参数)。
在使用ModelDriven和PropertiesDriven时,都需要使用params这个interceptor,如果使用ModelDriven,则还要定义Model-Driven interceptor。
Ps :妈的,为什么文档中不提及 domain Object 必须为私有这么一回事??