开发者

Servlet "newspring" is not available

Trying to set up a new spring project and im having this issue where I get this error (HTTP Status 404 - Servlet newspring is not available) when I navigate to a page that I expect to get routed through to a controller.

web.xml

<servlet> 
 <servlet-name>springapp</servlet-name>
 <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> 
 <load-on-startup>1</load-on-startup>
</servlet> 

<servlet-mapping> 
 <servlet-name>springapp</servlet-name> 
 <url-pattern>/app/*</url-pattern> 
</servlet-mapping> 

So I looked in the tomcat logs and I see this exception:

SEVERE: Error loading WebappClassLoader delegate: false

repositories: /WEB-INF/classes/ ----------> Parent Classloader: org.apache.catalina.loader.StandardClassLoader@a1807c org.springframework.web.servlet.DispatcherServlet java.lang.ClassNotFoundException开发者_运维问答: org.springframework.web.servlet.DispatcherServlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1095) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4149)

but the supposedly missing class is actually present in the spring-webmvc.jar which is present in the WEB-INF/libs(at tomcatfolder/webapp/newSpring/WEB-INF/libs).

Is it unable to look here ?


Assuming I read correctly, the folder should be /WEB-INF/lib, not /WEB-INF/libs - note the lack of s at the end!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜