struts2 常量配置详解
1,struts.action.extension
作用:设置为htm的时候, 把url后缀为htm的映射成为action
源码:org.apache.struts2.dispatcher.mapper.DefaultActionMapper
?
?
16,struts.configuration
这个配置经测试,貌似无效?
?
17,struts.locale
设置 struts 的 本地默认国家和语言。
?
?
18,struts.dispatcher.parametersWorkaround
什么跟WebLogic有关的设置,不懂,不解释。
?
?
19,struts.freemarker.manager.classname
作用:FreemarkerManager 的实现类 默认org.apache.struts2.views.freemarker.FreemarkerManager
?
20,struts.freemarker.templatesCache
不推荐使用这个,改为使用 struts.freemarker.mru.max.strong.size >0 ? ? ? ? ? ? ? ? struts.freemarker.templatesCache.updateDelay>0
?
21,struts.freemarker.templatesCache.updateDelay
作用:设置正整数和0 几秒钟更新一次freemarket模板
?
22,struts.freemarker.mru.max.strong.size
作用:设置正整数和0 引用英文原描述:the maximum number of strongly referenced templates
?
23,struts.freemarker.beanwrapperCache
作用:设置true 表示使用cache ?????
?
24,struts.velocity.manager.classname
作用:设置VelocityManager 的实现类,默认?org.apache.struts2.views.velocity.VelocityManager
?
25,struts.velocity.configfile
作用:设置哪里读取velocity 的velocity.properties
?
26,struts.velocity.toolboxlocation
作用:设置velocity的toolbox的位置
?
27,struts.velocity.contexts
设置velocity context 的类,以逗号分隔
?
28,struts.ui.templateDir
设置struts 的ui template 的位置
?
29,待补充中
?
?
/** The default UI template theme */
?? ?public static final String STRUTS_UI_THEME = "struts.ui.theme";
?
?? ?/** The maximize size of a multipart request (file upload) */
?? ?public static final String STRUTS_MULTIPART_MAXSIZE = "struts.multipart.maxSize";
?
?? ?/** The directory to use for storing uploaded files */
?? ?public static final String STRUTS_MULTIPART_SAVEDIR = "struts.multipart.saveDir";
?
?? ?/**
?? ? * The name of the bean that will handle multipart requests
?? ? */
?? ?public static final String STRUTS_MULTIPART_HANDLER = "struts.multipart.handler";
?
?? ?/**
?? ? * The org.apache.struts2.dispatcher.multipart.MultiPartRequest parser implementation
?? ? * for a multipart request (file upload)
?? ? */
?? ?public static final String STRUTS_MULTIPART_PARSER = "struts.multipart.parser";
?
?? ?/** How Spring should autowire. ?Valid values are 'name', 'type', 'auto', and 'constructor' */
?? ?public static final String STRUTS_OBJECTFACTORY_SPRING_AUTOWIRE = "struts.objectFactory.spring.autoWire";
?
?? ?/** Whether the autowire strategy chosen by STRUTS_OBJECTFACTORY_SPRING_AUTOWIRE is always respected. ?Defaults
?? ? * to false, which is the legacy behavior that tries to determine the best strategy for the situation.
?? ? * @since 2.1.3
?? ? */
?? ?public static final String STRUTS_OBJECTFACTORY_SPRING_AUTOWIRE_ALWAYS_RESPECT = "struts.objectFactory.spring.autoWire.alwaysRespect";
?
?? ?/** Whether Spring should use its class cache or not */
?? ?public static final String STRUTS_OBJECTFACTORY_SPRING_USE_CLASS_CACHE = "struts.objectFactory.spring.useClassCache";
?
?? ?/** Whether or not XSLT templates should not be cached */
?? ?public static final String STRUTS_XSLT_NOCACHE = "struts.xslt.nocache";
?
?? ?/** Location of additional configuration properties files to load */
?? ?public static final String STRUTS_CUSTOM_PROPERTIES = "struts.custom.properties";
?
?? ?/** Location of additional localization properties files to load */
?? ?public static final String STRUTS_CUSTOM_I18N_RESOURCES = "struts.custom.i18n.resources";
?
?? ?/** The org.apache.struts2.dispatcher.mapper.ActionMapper implementation class */
?? ?public static final String STRUTS_MAPPER_CLASS = "struts.mapper.class";
?
?? ?/**
?? ? * A prefix based action mapper that is capable of delegating to other
?? ? * {@link org.apache.struts2.dispatcher.mapper.ActionMapper}s based on the request's prefix
?? ? * You can specify different prefixes that will be handled by different mappers
?? ? */
?? ?public static final String PREFIX_BASED_MAPPER_CONFIGURATION = "struts.mapper.prefixMapping";
?
?? ?/** Whether the Struts filter should serve static content or not */
?? ?public static final String STRUTS_SERVE_STATIC_CONTENT = "struts.serve.static";
?
?? ?/** If static content served by the Struts filter should set browser caching header properties or not */
?? ?public static final String STRUTS_SERVE_STATIC_BROWSER_CACHE = "struts.serve.static.browserCache";
?
?? ?/** Allows one to disable dynamic method invocation from the URL */
?? ?public static final String STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION = "struts.enable.DynamicMethodInvocation";
?
?? ?/** Whether slashes in action names are allowed or not */
?? ?public static final String STRUTS_ENABLE_SLASHES_IN_ACTION_NAMES = "struts.enable.SlashesInActionNames";
?
?? ?/** Prefix used by {@link CompositeActionMapper} to identify its containing {@link org.apache.struts2.dispatcher.mapper.ActionMapper} class. */
?? ?public static final String STRUTS_MAPPER_COMPOSITE = "struts.mapper.composite";
?
?? ?public static final String STRUTS_ACTIONPROXYFACTORY = "struts.actionProxyFactory";
?
?? ?public static final String STRUTS_FREEMARKER_WRAPPER_ALT_MAP = "struts.freemarker.wrapper.altMap";
?
?? ?/** The name of the xwork converter implementation */
?? ?public static final String STRUTS_XWORKCONVERTER = "struts.xworkConverter";
?
?? ?public static final String STRUTS_ALWAYS_SELECT_FULL_NAMESPACE = "struts.mapper.alwaysSelectFullNamespace";
?
?? ?/** XWork default text provider */
?? ?public static final String STRUTS_XWORKTEXTPROVIDER = "struts.xworkTextProvider";
?
?? ?/** The name of the parameter to create when mapping an id (used by some action mappers) */
public static final String STRUTS_ID_PARAMETER_NAME = "struts.mapper.idParameterName";
/** The name of the parameter to determine whether static method access will be allowed in OGNL expressions or not */
public static final String STRUTS_ALLOW_STATIC_METHOD_ACCESS = "struts.ognl.allowStaticMethodAccess";
?
/** The com.opensymphony.xwork2.validator.ActionValidatorManager implementation class */
?? ?public static final String STRUTS_ACTIONVALIDATORMANAGER = "struts.actionValidatorManager";
?
?? ?/** The {@link com.opensymphony.xwork2.util.ValueStackFactory} implementation class */
?? ?public static final String STRUTS_VALUESTACKFACTORY = "struts.valueStackFactory";
?
?? ?/** The {@link com.opensymphony.xwork2.util.reflection.ReflectionProvider} implementation class */
?? ?public static final String STRUTS_REFLECTIONPROVIDER = "struts.reflectionProvider";
?
?? ?/** The {@link com.opensymphony.xwork2.util.reflection.ReflectionContextFactory} implementation class */
?? ?public static final String STRUTS_REFLECTIONCONTEXTFACTORY = "struts.reflectionContextFactory";
?
?? ?/** The {@link com.opensymphony.xwork2.util.PatternMatcher} implementation class */
?? ?public static final String STRUTS_PATTERNMATCHER = "struts.patternMatcher";
?
?? ?/** The {@link org.apache.struts2.dispatcher.StaticContentLoader} implementation class */
?? ?public static final String STRUTS_STATIC_CONTENT_LOADER = "struts.staticContentLoader";
?
?? ?/** The {@link com.opensymphony.xwork2.UnknownHandlerManager} implementation class */
?? ?public static final String STRUTS_UNKNOWN_HANDLER_MANAGER = "struts.unknownHandlerManager";
?
?? ?/** Throw RuntimeException when a property is not found, or the evaluation of the espression fails*/
?? ?public static final String STRUTS_EL_THROW_EXCEPTION = "struts.el.throwExceptionOnFailure";
?
?? ?/** Logs properties that are not found (very verbose) **/
?? ?public static final String STRUTS_LOG_MISSING_PROPERTIES = "struts.ognl.logMissingProperties";
?
?? ?/** Enables caching of parsed OGNL expressions **/
?? ?public static final String STRUTS_ENABLE_OGNL_EXPRESSION_CACHE = "struts.ognl.enableExpressionCache";
?