1、File-->Project Structure-->Artifacts-->+号-->JavaEE Appliction:Archive-->For 'firstdemo war:exploed'
Build-->Build Artifacts-->All Artifacts-->Builde
执行上述操作后在根目录出现out目录下war包,将WAR包放入TomCat Webapps目录下,启动TomCat后自动解压该war包