解决方式: 点击File->Project Structure ,选择Facets,选择你用的modules,Source Rooots下的打上勾,点击apply.然后就能new出servlet了 new出servlet成果图: