Web. XMLAny MVC framework needs to be integrated with a Web application, and this has to be borrowed for the. xml file, and only the servlet in the CONFIG. xml file will be loaded by the applicationModel2:jsp+javabean+servletTypically, all MVC frameworks require a Web application to load a core controller, and for the STRUTS2 framework, you need to load strutsperpareandexecutefilter, Only the web App load Strutsperpareandexecutefilter,strutsperpareandexecutefilter will load the STRUTS2 framework. Encountered. Acton files are intercepted and processedStruts.xmlStruts2 's core profile is the most utilized in the development process. The file is primarily responsible for managing the mapping of the action, as well as the definition of the result contained in the action. What is included in Struts.xml: 1, global attribute 2, user request and corresponding action 3, parameters that the action may use and return result 4, Various interceptors are configured STRUTS.PROPERTIESSTRUTS2 the global properties file of the framework, automatically loaded and strusts.xml in a path where the file contains many Key-value key-value pairs. This file can be configured in Structs.xml and can be replaced with the constant element. DTD is the constraint struts.xml can have which tags can be in the <include file= "" > Include other files you can separate each function module into an XML configuration file, and then use the Include node reference <package>package provides a way to make multiple actions into a module the name of the package must be unique, You can add some extended packages to this package <package name= the name of the inherited parent class of "package name" extends= "abstract sets the properties of the packages as abstractions, the abstract package cannot define the value of the action, ture or False Namespace package namespace ><interceptors> for interceptors you can define name (name) and Class (Classpath) <interceptor-stack> Interceptor stacks for interceptors < Default-interceptor-ref name= "" > Define the default Interceptor, each action will automatically reference
Java configuration file