首先,需要idea2020.3月及以上的版本,Tomcat也需要8.0或者9.0版本的。
其次,部署好Java动态模块的同时,还需要保证勾选上WebApplication,并且create xml 的版本是4.0的,很重要!
最后,针对于每个web模块,都需要点击Run-Edit Configurations,点击左上角的+,添加Tomcat server-Local:
Name就和当前web模块一样就好,方便之后勾选;
在Server选项下,URL以ModuleName_war_exploded为目录;为了避免端口号占用,最好每个模块重新设立一个端口号;
在Deployment选项下,点击+添加Artifact,选择模块名:war exploded那一项,点击Apply之后选择OK就完成了。
回到该模块下,Configurations选择对应的Artifact,找到该模块下的index.jsp,运行它就能解决There is no configured/running web-servers found! Please, run any web-configuration and hit the Refresh button!的报错啦!
本文仅为学习过程中解决的小办法,希望能帮到初学者。
以下是本文参考解决的原帖,侵删
IDEA报错:There is no configured/running web-servers found! Please, run any web-configuration and hit_百里守约学编程的博客-优快云博客^v32^pc_search_result_control_group,185^v2^control&utm_term=there%20is%20no%20configured%2Frunning&spm=1018.2226.3001.4187