Struts2 中的零配置的常量

 

Configuration reference

Add a constant element to your struts config file to change the value of a configuration setting, like:

<constant name="struts.convention.result.path" value="/WEB-INF/mytemplates/"/>

 
                    Name                                                  Default Value                                           Description

struts.convention.action.
        alwaysMapExecute
trueSet to false, to prevent Convention from  creating a default mapping to "execute" when there are other methods annotated as actions in the class
struts.convention.action.
        includeJars
Comma separated list of regular expressions of jar URLs to be scanned. eg. ".myJar-0\.2.,.thirdparty-0\.1."
struts.convention.action.
         packages
An optional list of action packages that this should create configuration for (they don't need to match a locator pattern)
struts.convention.result.
         path
/WEB-INF/content/Directory where templates are located
struts.convention.result.
         flatLayout
trueIf set to false, the result can be put in its own directory: resultsRoot/namespace/actionName/result.extension
struts.convention.action.
         suffix
ActionSuffix used to find actions based on class names
struts.convention.action.
         disableScanning
falseScan packages for actions
struts.convention.action.
         mapAllMatches
falseCreate action mappings, even if no @Action is found
struts.convention.action.
         checkImplementsAction
trueCheck if an action implements com.opensymphony.xwork2.Action to create an action mapping
struts.convention.default.
         parent.package
convention-defaultDefault parent package for action mappins
struts.convention.action.
         name.lowercase
trueConvert action name to lowercase
struts.convention.
         action.name.separator
-Separator used to build the action name, MyAction -> my-action. This character is also used as the separator between the action name and the result in templates, like action-result.jsp
struts.convention.
         package.locators
action,actions,struts,
struts2
Packages whose name end with one of these strings will be scanned for actions
struts.convention.package.
         locators.disable
falseDisable the scanning of packages based on package locators
struts.convention.exclude.
         packages
org.apache.struts.*,
org.apache.struts2.*,
org.springframework.
       web.struts.*,
org.springframework.
       web.struts2.*,
org.hibernate.*
Packages excluded from the action scanning
struts.convention.package.
         locators.basePackage
If set, only packages that start with its value will be scanned for actions
struts.convention.relative.
         result.types
dispatcher,velocity,
freemarker
The list of result types that can have locations that are relative and the result location (which is the resultPath plus the namespace) prepended to them
struts.convention.redirect.
         to.slash
trueA boolean parameter that controls whether or not this will handle unknown actions in the same manner as Apache, Tomcat and other web servers. This handling will send back a redirect for URLs such as /foo to /foo/ if there doesn't exist an action that responds to /foo
struts.convention.classL
         oader.excludeParent
trueExclude URLs found by the parent class loader from the list of URLs scanned to find actions (needs to be set to false for JBoss 5)
struts.convention.action.eagerLoadingfalseIf set, found action classes will be instantiated by the ObjectFactory to accelerate future use, setting it up can clash with Spring managed beans

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值