4

How should I write line:

<a href="User?id=<c:out value="${user.id}" />" >Profile</a>

correctly? It shoult give me something like Profile

My context:

<c:forEach items="${requestScope.users}" var="user">
    <tr>
    <td><c:out value="${user.login}" /></td>
<td><c:out value="${user.name}" /></td>
    <td><c:out value="${user.lastname}" /></td>
    <td><a href="User?id=<c:out value="${user.id}" />" >Profile</a></td>
    </tr>
</c:forEach>
4

2 回答 2

5

'在里面试试,"反之亦然

<a href="User?id=<c:out value='${user.id}' />" >Profile</a>
于 2013-01-11T08:50:01.193 回答
0

在此处查看图片

这段代码应该做 <td><a href="showDetails.jsp?id=${row.id}">Details</a></td>

于 2021-08-26T12:38:56.767 回答