springmvc中遇到的问题

来源:互联网 发布:我赢职场java视频下载 编辑:程序博客网 时间:2024/06/05 18:34

1.
**九月 08, 2017 5:23:59 下午 org.springframework.web.servlet.DispatcherServlet noHandlerFound
警告: No mapping found for HTTP request with URI [/springmvc-2/springmvc/emps] in DispatcherServlet with name ‘springDispatcherServlet’**

我只注意到No mapping found for HTTP request with URI [/springmvc-2/springmvc/emps],搞了半天才发现org.springframework.web.servlet.DispatcherServlet noHandlerFound这句才是关键,意思是根本找不到handler,原因是handler类上忘了加@Controller注解。

2.
HTTP Status 500 - /WEB-INF/views/list.jsp (line: 12, column: 1) According to TLD or attribute directive in tag file, attribute test does not accept any expressions
原因:没有正确引用jstl标签库。
标准代码如下:<%@taglib prefix=”c” uri=”http://java.sun.com/jsp/jstl/core” %>