提交 a1e4f4f4 编写于 作者: J Juergen Hoeller

MVC mappings properly apply even to welcome file entries that forward to a...

MVC mappings properly apply even to welcome file entries that forward to a DispatcherServlet (SPR-7143)
上级 fa7472c0
......@@ -158,8 +158,10 @@ public class UrlPathHelper {
else {
// Special case: URI is different from servlet path.
// Can happen e.g. with index page: URI="/", servletPath="/index.html"
// Use servlet path in this case, as it indicates the actual target path.
return servletPath;
// Use path info if available, as it indicates an index page within
// a servlet mapping. Otherwise, use the full servlet path.
String pathInfo = request.getPathInfo();
return (pathInfo != null ? pathInfo : servletPath);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册