Struts2 Overview
1. The struts2 framework applies the web layer framework in the javaee three-layer structure.
2. The strut2 framework develops a new framework based on struts1 and webwork.
3. Problems solved by struts2:
4. Version: struts2.3.24
5. Common web layer frameworks
(1) struts2
(2) springmvc
Getting started with the struts2 framework
Configure the action class access path
(1) Create the struts2 core configuration file
-The file name and location of the core configuration are fixed,
-The location must be under SRC with the Struts. xml name.
(2) Introduce DTD Constraints
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">
Basic struts. xml configuration
<Struts> <package name = "hellodemo" extends = "struts-Default" namespace = "/"> <! -- Name: Access name --> <action name = "hello" class = "cn. itcast. Action. helloaction"> <! -- Return Value of the configuration method to the page --> <result name = "OK">/Hello. jsp </result> </Action> </package> </struts>
Configure the struts2 Filter
Struts2 Learning (1)