Framework : The so-called framework is put some tedious repetitive code is encapsulated, the programmer in the code to put more energy into the analysis of business needs and understand the above
SHH:strust spring hibernate;
SSM:springmvc spring mybatis ;
Struts2 : Apache Struts2 is the issue of open source MVC framework. Note that he was just the presentation layer web (MVC) framework
Struts2 Introduction
Struts2 configuration file packGE elements Detailed
package elements
Role: the introduction of object-oriented thinking in struts2 configuration file, use the subcontract management. Action easy to manage, easy to modular development Action
Attribute name:
Name of the package. It must be written and must be unique
Property extends:
Need to inherit struts-default package 1. In general, but not required
2. But if you do not inherit it, you will not be able to use the core functionality provided by struts2
3.struts-default.xml defined in the struts-default envelope
4. The struts-default.xml is loaded before loading our struts.xml
Properties namespace:
Namespace [namespace access route = name + action], for example, requires a slash / day1 when writing profile
Properties abstract:
The package is declared as abstract bag abstract bag is used to inherited
As long as there is no
action elements
The name attribute: action name
class attribute: Action Full name
method: Method Name Action class. Method Requirements: 2.f 1public return value must be String 3: No Parameter