Intellij IDEA中使用Struts2
据说struts2中有很多的漏洞, 不过作为学习我也就用了吧, 因为书上面是按着这个讲的呀.
难怪官网上也没有struts2.2.1的版本的下载.
1. 下载struts2.2.1 ga版本
2. 新建一个web工程
3. 将下列的包导入到web/WEB-INF/lib目录下, 并添加包
4. 在web.xml文件中添加如下配置
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
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">
<!-- 定义Struts2的核心Filter -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<!-- 让Struts2的核心Filter拦截所有请求 -->
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
Intellij IDEA中使用Struts2的更多相关文章
- IntelliJ IDEA中使用综合使用Maven和Struts2
在Intellij IDEA中手动使用Maven创建Web项目并引入Struts2 创建一个新的Maven项目 建好项目之后点击左下角的enable auto import 项目部署 在Moudule ...
- Intellij Idea中的Jetty报出Web application not found src/main/webapp错误的解决方案
今天在Intellij Idea中编译项目的时候,运行起来一直会报出如下的错误: Web application not found src/main/webapp 当时感觉应该是什么文件缺少了.所以 ...
- web项目中加入struts2、spring的支持,并整合两者
Web项目中加入struts2 的支持 在lib下加入strut2的jar包 2. 在web.xml中添加配置 <filter> <filter-name>struts2< ...
- 在Web应用和IntelliJ IDEA中使用Spring框架
在JAVA SE和Web应用中都可以使用Spring, 这里只说在Web程序中的应用. 下面将以Spring 3.0.5版本为例. 在Web中使用Spring只需要如下两个步骤: 第一,将Spring ...
- IntelliJ IDEA 中集成使用git(2015年06月10日)
前提:需要有一个git账号,https://github.com/ 1.首先需要下载一个Github,https://windows.github.com 安装之后的界面是酱紫的,非常简洁美观 2.在 ...
- IntelliJ IDEA中怎样使用JUnit4
背景 近期參与了一个Anroid医疗项目,当中项目底层有非常多基础类及通讯类,并且非常多涉及复杂的字节操作还有多线程同步及状态机处理.这种项目做一下TDD还是必要的,尽量项眼下期把风险减少一些. ...
- 在Intellij IDEA中使用Debug
Debug用来追踪代码的运行流程,通常在程序运行过程中出现异常,启用Debug模式可以分析定位异常发生的位置,以及在运行过程中参数的变化.通常我们也可以启用Debug模式来跟踪代码的运行流程去学习三方 ...
- IntelliJ IDEA中Mapper接口通过@Autowired注入报错的正确解决方式
转载请注明来源:四个空格 » IntelliJ IDEA中Mapper接口通过@Autowired注入报错的正确解决方式: 环境 ideaIU-2018.3.4.win: 错误提示: Could no ...
- IntelliJ IDEA中项目报错org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 8 或maven操作compile报resource使用utf8这样的编码错
问题:项目开发工具已经setting成utf-8 并且项目各方面的配置文件包括maven这些的pom.xml里的配置都已经设置为utf-8 但是还报错 IntelliJ IDEA中项目报错org.xm ...
随机推荐
- SSIS 关于并发的两个设置
1.MaxConcurrentExecutables(包级别的并发度控制) MaxConcurrentExecutables, a package level property in SSIS det ...
- PHP人民币金额数字转中文大写的函数
<?php header("Content-Type:text/html;charset=utf-8"); error_reporting(2); function cny( ...
- TM1680主从I2C设置.
TM1680的工作流程通常是: 1. 通电, 没啥可说 2. SYS DIS (主从), 1000-0000即0x80, 关闭系统时钟跟LED循环, 主机都从机地址都要发 3. COM设置 (主从), ...
- loadruner报错:Step download timeout(120 seconds)的一个解决方法
一个网友问了我一个问题如下: loadruner报错:Error -27728: Step download timeout (120 seconds) 如何解决 语 法检查通过,但是在并发执行一个查 ...
- laravel的安装
安装composer http://docs.phpcomposer.com/download/ curl -sS https://getcomposer.org/installer | php mv ...
- NIOS II开发备忘录
大概有一年没做NIOS II的开发了,回想上一次做NIOS II还是去年做毕业设计的时候.那时候做的是基于SOPC的频率特性测试仪,我大约花了2个月的时间,从无到有的学习了NIOS II开发.学习过N ...
- 安装keepalived
主机名 网络IP VIPnode1 192.168.2.161 192.168.2.165node2 192.168.2.162 [root@node ...
- Intent 转向
Intent intent = new Intent(CardInfoActivity.this, CardRechargeListActivity.class); intent.putExtra(& ...
- NSDictionary to jsonString || 对象转json格式
-(NSString*)DataTOjsonString:(id)object { NSString *jsonString = nil; NSError *error; NSData *jsonDa ...
- 文件名唯一(A.txt => An.txt)
/// <summary> /// 文件名唯一(A.txt => An.txt) /// </summary> /// <param name="full ...