The framework uses a number of properties that can be changed to fit
your needs. To change any of these properties, specify the property key
and value in an struts.properties file. The properties file can be locate anywhere on the classpath, but it is typically found under /WEB-INF/class Constant Configuration Constants provide a simple way to customize a Struts application by defining key settings that modify framework and plugin behavior. There are two key roles for constants. First, they are used to override settings like the maximum file upload size or whether the Struts framework should be in "devMode" or not. Second, they specify which Bean, among multiple implementations of a given type, should be chosen. Constants can be declared in multiple files. By default, constants are searched for in the following order, allowing for subsequent files to override previous ones:
Interceptor
The StaticParametersInterceptor and Parameters Interceptor populate your Action fields during the ActionInvocation execution.
The StaticParametersInterceptor should be applied before the ParametersInterceptor so that the static parameters may be set as the defaults and overridden by the request parameters. |
|
来自: cherishchen > 《struts2》