解决方法:
选择File下的 Project Structure
点击Facets
点击Deployment Descriptors下的 Add Application Server specific descriptor
直接点OK就行,再OK确定应用设置。
转自https://blog.csdn.net/wushaoji321/article/details/107610426?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~all~first_rank_v2~rank_v25-1-107610426.nonecase&utm_term=idea%E9%87%8Cnew%E4%B8%8D%E4%BA%86servlet