Intellij跑非maven的java web项目

相信很多刚用Intellij小白鼠进行跑java web项目时候,都不知道怎么跑,而跑maven的话,自然是知道的,博主也是自己摸索了一段时间才出来,希望可以帮助到大家,知道怎么弄的就捧个人场,不知道的话,就当作学习一下吧,废话不多说,就开始讲了。(本文是以已经配置好项目的基础上讲的,假如不知道怎么倒入项目的,百度上大把文章,我就不重复了)

一.配置好tomcat的服务器(setting>>Build...>>Application Servers)

Intellij跑非maven的java web项目


二.配置好项目的输出目录(进入Project Structure)

Intellij跑非maven的java web项目

1.配置程序Facets

Intellij跑非maven的java web项目

Intellij跑非maven的java web项目Intellij跑非maven的java web项目

Intellij跑非maven的java web项目

Intellij跑非maven的java web项目

2.配置程序的artifacts 

Intellij跑非maven的java web项目

Intellij跑非maven的java web项目

Intellij跑非maven的java web项目



三.程序的运行配置(进入Run/Debug Configurations)

Intellij跑非maven的java web项目

Intellij跑非maven的java web项目

Intellij跑非maven的java web项目

Intellij跑非maven的java web项目

Intellij跑非maven的java web项目

Intellij跑非maven的java web项目

最后的运行结果

Intellij跑非maven的java web项目