【发布时间】:2014-08-23 11:21:37
【问题描述】:
我们有以下情况
<a href="<c:url value="/inventory"/>">Example 1</a>
<a href="<c:url value="/inventory/?type=removed"/>">Example 2</a>
控制器
@RequestMapping(value = "inventory", method = RequestMethod.GET)
public String printInventoryPage(
ModelMap model,
@RequestParam(value = "type", required = false) String type) {
return "inventory";
}
“示例 1”效果很好,但如果我单击“示例 2”会产生类似这样的错误
org.springframework.web.servlet.PageNotFound noHandlerFound
WARNING: No mapping found for HTTP request with URI [/exampleproject/inventory/resources/js/jquery.js] in DispatcherServlet with name 'spring'
当然,错误适用于所有资源,如 css、javascripts 等。
除了任何网页,我包括所有使用<jsp:include page="header.jsp"/>的资源
可能是什么原因?
【问题讨论】: