struts2.2.1配置

来源:互联网 发布:淘宝网店没生意怎么办 编辑:程序博客网 时间:2024/04/29 15:17
 

1.所需Jar包:

struts2.2.1配置 - qincidong - qincidong的博客
web.xml配置:
<filter>
  <filter-name>struts2</filter-name>
  <filter-class>
   org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
 </filter>
 <filter-mapping>
  <filter-name>struts2</filter-name>
  <url-pattern>/*</url-pattern>
 </filter-mapping>
在WEB-INF/classes目录下,新建struts.xml,模版如下:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
</struts>
原创粉丝点击