1、配置tomcat应用服务器
File->Settings...
Build,Execution,Deployment ->Application Servers
点击"+"号,选择"Tomcat Server"

选中tomcat 的地址,点击OK

2、配置web应用
Defaults->TomcatServer
点击"+"号,

Server tab页,修改Name ,Applicaton server 下拉框选择刚才配置的Tomcat应用服务器。 

Deployment目录选择要部署的web应用,注意此处一定要选到WebContent文件夹,即WEB-INF上的上一级目录:

点击OK,并配置应用的上下文路径:

3、修改编译输出路径。
工程->右键->Open Module Settings
选择Paths tab页,将output path:配置到WEB-INFclasses中,否则会找不到类。

4、启动tomcat

完毕!