IDEA配置tomcat的方法、IDEA配置tomcat运行web项目
IDEA配置tomcat的方法
1.打开idea,在项目运行列表下拉选择“Edit Configurations”
2.点击 左上角的"+">Templates -> Tomcat Server -> Local>ok
3.在打开的界面,第一行“Name”中填入tomcat的名称
4.然后点击Configure…,在Application Servers界面,点击“+”,在Tomcat Server配置界面选择要添加的已安装的tomcat路径(bin的上一级路径),最后点击“OK”
5.上图中左下方的Warning,是指配置的TOMCAT中未添加web项目
IDEA配置tomcat运行web项目
一.创建、配置项目 1.1创建项目 File>New> Project - 勾选Web Application >【next】,并生成web.xml配置文件
这里给自己的项目改个名称 > Finish
1.2配置项目模块 配置Source 在 项目-web-WEB INF 下创建两个文件夹 classes 和 lib 配置Paths 将两个output path 修改为 刚才创建的classes的地址 配置 Denpendencies 右边有个绿色小加号 - JARs or directories… 选刚才创建的lib地址 选Jar Directory 后面就 ok -ok ,项目就配置好了~
启动 tomcat 服务 验证结果
web项目结构: tomcat的下载(本人用的是Tomcat 8)
