IntelliJ IDEA14如何配置tomcat
1、配置tomcat应用服务器
File->Settings...
Build,Execution,Deployment ->Application Servers
点击"+"号,选择"Tomcat Server"
![](https://images2015.cnblogs.com/blog/775861/201607/775861-20160722171833044-871522338.png)
选中tomcat 的地址,点击OK
![](https://images2015.cnblogs.com/blog/775861/201607/775861-20160722171834372-1350029652.png)
2、配置web应用
Defaults->TomcatServer
点击"+"号,
![](https://images2015.cnblogs.com/blog/775861/201607/775861-20160722171837404-1832507639.png)
Server tab页,修改Name ,Applicaton server 下拉框选择刚才配置的Tomcat应用服务器。 ![](https://images2015.cnblogs.com/blog/775861/201607/775861-20160722171839091-26855199.png)
![](https://images2015.cnblogs.com/blog/775861/201607/775861-20160722171839091-26855199.png)
Deployment目录选择要部署的web应用,注意此处一定要选到WebContent文件夹,即WEB-INF上的上一级目录:
![](https://images2015.cnblogs.com/blog/775861/201607/775861-20160722171840451-201434032.png)
点击OK,并配置应用的上下文路径:
![](https://images2015.cnblogs.com/blog/775861/201607/775861-20160722171841622-1876661973.png)
3、修改编译输出路径。
工程->右键->Open Module Settings
选择Paths tab页,将output path:配置到WEB-INF\classes中,否则会找不到类。
![](https://images2015.cnblogs.com/blog/775861/201607/775861-20160722171842794-1485497711.png)
4、启动tomcat
![](https://images2015.cnblogs.com/blog/775861/201607/775861-20160722171843810-597669923.png)
完毕!