eclipse java.lang.ClassNotFoundException:org.springframework.web.servlet.DispatcherServlet [duplicate]

dxxyhpgq  于 2023-10-18  发布在  Eclipse
关注(0)|答案(1)|浏览(140)

此问题已在此处有答案

ClassNotFoundException when using User Libraries in Eclipse build path(2个答案)
How to add JAR libraries to WAR project without facing java.lang.ClassNotFoundException? Classpath vs Build Path vs /WEB-INF/lib(5个答案)
上个月关门了。
我已经在java构建路径的库和lib文件夹中插入了所有需要的jar文件。当我尝试运行代码时,它显示java.lang.ClassNotFoundException:org.springframework.web.servlet.DispatcherServlet.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
    
    <servlet>
       <servlet-name>frontcontroller</servlet-name>
       <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    </servlet>
    
    <servlet-mapping>
       <servlet-name>frontcontroller</servlet-name>
       <url-pattern>*.*</url-pattern>
    </servlet-mapping>

</web-app>

ffscu2ro

ffscu2ro1#

进入properties --> Deployment Assembly--> Add --> java build path-->put all your jar here and apply

相关问题