JSP更改标题栏图标失败

 <%
 String path = request.getContextPath();
 String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<title>测试页面</title>
<link rel="shortcut icon" href="<%=basePath %>/images/bird.ico" />

图片说明

这是我的代码和文件结构,但是运行之后标题栏的图标并没有改变,浏览器也没有报错,请问是什么原因?

 String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
这个拼的不对吧http://ip:端口/工程路径
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ "/" + path;

icon图标放根目录试试

图片说明
图片说明
图片说明
我这边这样弄的话是显示得了的,图标确实会遇到很多问题例如缓存等等。不过你把ico名字换成favicon.ico试试吧。基本上都是用的这个名字。
当你成功了的时候也告诉我一声怎么解决的