<%--
Created by IntelliJ IDEA.
User: Jchan
Date: 2019/7/24
Time: 16:29
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" import="com.soecode.lyf.entity.*,java.util.*" %>
<html>
<head>
<title>Title</title>
<style>
</style>
</head>
<body>
<style type="text/css">
table.dataintable {
margin-top:15px;
border-collapse:collapse;
border:1px solid #aaa;
width:100%;
}
table.dataintable th {
vertical-align:baseline;
padding:5px 15px 5px 6px;
background-color:#3F3F3F;
border:1px solid #3F3F3F;
text-align:left;
color:#fff;
}
table.dataintable td {
vertical-align:text-top;
padding:6px 15px 6px 6px;
border:1px solid #aaa;
}
table.dataintable tr:nth-child(odd) {
background-color:#F5F5F5;
}
table.dataintable tr:nth-child(even) {
background-color:#fff;
}
.touxiang{
height: 40px;
width: 100px;
}
</style>
<%
String Path = request.getContextPath();
String basePath = request.getScheme()+"://" + request.getServerName()+":"+request.getServerPort()+Path+"/";
%>
<table class="dataintable">
<tr>
<th>
<img class="touxiang" src="loverday/touxiang.jpg/" alt="用戶頭像">
</th>
</tr>
<tr>
<th>用戶名</th>
<th>創建時間</th>
<th>用戶等級</th>
<th>用戶暱稱</th>
<th>用戶粉絲</th>
</tr>
<tr>
<td>${requestScope.username}</td>
<td>${requestScope.createtime}</td>
<td>${requestScope.userlevel}</td>
<td>${requestScope.nickname}</td>
<td>${requestScope.fansid}</td>
</tr>
</table>
</body>
</html>
ctrl+右鍵點擊img鏈接在代碼中能連接並顯示圖片,但是部署的項目點擊之后頁面無法顯示圖片,看console里面顯示的圖片訪問路徑不對
弄不懂是為啥