Struts2配置
来源:互联网 发布:女孩子湿有多夸张知乎 编辑:程序博客网 时间:2024/06/06 21:44
1新建dwp项目文件--->structs.xml-->导入jar包(9个必要7个)-->web.xml
2.server Tomcat
解释:Struct.xml 必须放在src下 默认写死了Thread.currentThread().getContextClassLoader().getResource("struts.xml")
或者要想不放在src下自己配置,在web.xml中:<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
<init-param>
<param-name>config</param-name>
<param-value>struts-default.xml,struts-plugin.xml,struts/struts.xml </param-value>
</init-param>
</filter>
jar包放在webContent-->webInf-->lib下
web.xml放在webContent-->webInf下
补充:当你改变action的name时要重启服务器才能运行不然报错,解决方案在struct.xml中加一行<constant name="Struts.devMode" Value="true">改成开发者模式可以不需要重启服务
0 0
- struts2配置
- struts2配置
- Struts2配置
- Struts2配置
- struts2 配置
- Struts2配置
- Struts2配置
- Struts2 配置
- struts2 配置
- struts2配置
- struts2配置
- struts2配置
- struts2配置
- struts2配置
- struts2配置
- struts2配置
- struts2配置
- struts2配置
- 习题3-28
- 初识Struts
- css学习基础之css sprite
- Linux中Nginx安装与配置(CentOS-6.5:nginx-1.5.0)
- Varnish介绍
- Struts2配置
- AbstractFactory Pattern(抽象工厂模式)
- mongodb学习笔记
- 服务器测试工具【Netperf、NetIQ Chariot、NetBench、ServerBench、FileBench、BenchMark Factory等】
- Android核心基础-3.Android 开发环境搭建
- 14 POJ3363 Annoying painting tool
- 石子归并(dp)
- YII2.0 Activeform表单组件的使用方法
- [C++]LeetCode 20: Valid Parentheses(判断运算符有效性)