Struts 2 configuration static resource code details

The struts 2 framework has two core configuration files: struts XML and struts 2 default properties file default Properties (in struts 2-core-2.3.20. Jar)

default. Properties can write a struts under the classpath by yourself Customize and rewrite the properties file

Why struts Properties, which can be found at org apache. struts2. Defaultsettings and propertiesettings source code under config

DefaultSettings. java

PropertiesSettings. java

You can also write what you want in struts The custom configuration of properties is written in struts In the < constant > node under the XML file, if java training is configured in two files at the same time, and one project is the same, first load struts XML, and then load struts Properties, that is, struts Properties can override struts Configuration in XML

In the struts source code, struts constants Class contains all configurable items

among

The path that is not handled by struts 2 is saved. We are in struts Properties or struts XML

Regular expression, not URL matching address

summary

The above is all about the detailed explanation of the static resource code of struts 2 configuration in this paper. I hope it will be helpful to you. Interested friends can refer to: Struts2 static resource mapping code example. Struts2 realizes projection through ognl expression. Struts2 modifies the upload file size limit method analysis, etc. if you have any questions, you can leave a message at any time. Xiaobian will reply to you in time. Thank you for your support.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>