1、struts的配置
2、struts的动态方法调用
3、struts的传参
4、struts与tomcat的集成
一、struts的配置建一个项目
修改web.xml由2.3至3.1
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
Archetype Created Web Application
配置插件,改jdk版本--》在pom.xml中改变
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
lv.com
lv.struts
war
0.0.1-SNAPSHOT
lv.struts Maven Webapp
http://maven.apache.org
junit
junit
3.8.1
test
lv.struts
org.apache.maven.plugins
maven-compiler-plugin
3.7.0
1.8
1.8
UTF-8
改编译器:
这样就出来了:
1、依赖--》maven的pom.xml
导入jar包(struts与tomcat的jar包):在pom.xml文件中
javax.servlet
javax.servlet-api
4.0.1
provided
org.apache.struts
struts2-core
2.5.13
依赖完成:
2、做配置--》配置过滤器
3、开发--》写子控制器继承ActionSupport



