Struts的核心配置

一.配置struts.xml文件

1.struts.xml文件

2.常量配置

  • <constant>
  • struts.properities
  • web.xml中的<init-param>

3.包配置

  Struts2框架的核心组件是Action和拦截器,它使用包来管理Action和拦截器。每个包就是多个Action、多个拦截器、多个拦截器引用的集合。

4.包含配<include>

二.Action的配置

1.Action控制类的三种实现方式

  • POJO的实现
  • 实现Action接口
  • 继承ActionSupport类

2.配置Action

3.使用通配符

三.Action访问Servlet API

 

posted @ 2016-12-16 11:11  stubbornnnnnnn  阅读(155)  评论(0编辑  收藏  举报