问题描述:

IDEA中启动tomcat,报错ContextLoaderListener找不到

解决问题:

因为打包时候没有将引用资源打包出来,所以需要手动添加资源文件到输出包中。

IDEA中的操作:

在IDEA中点击File > Project Structure > Artifacts > 在右侧Output Layout右击项目名,选择Put into Output Root
IDEA ClassNotFoundException: org.springframework.web.context.ContextLoaderListener报错
IDEA ClassNotFoundException: org.springframework.web.context.ContextLoaderListener报错

运行效果:

IDEA ClassNotFoundException: org.springframework.web.context.ContextLoaderListener报错

补充:

项目结构
以上结果显示的是 /webapp/index.jsp的内容
IDEA ClassNotFoundException: org.springframework.web.context.ContextLoaderListener报错

相关文章: