我想通过href将值从jsp发送到servlet ..但是我不知道如何附加数据..请使用jstl标签只有没有servlet请... 我检查过这个pass values from jsp to servlet using <a href>,但他们使用了scriplets ..
<tr div class="even">
<td style="font-size:14px;">
<a href="/myproject/s/permanentUserAuctionHistory?aid=" <c:out value="${auctionDo.auctionId}"/>>
<c:out value="${auctionDo.auctionId}"/> </a></td>
答案 0 :(得分:1)
在aid=
属性中的href
后双引号(“)会导致href
。
您可以使用JSTL
<a href="/myproject/s/permanentUserAuctionHistory?aid=${auctionDo.auctionId}">
<c:out value="${auctionDo.auctionId}"/>
</a>
OR
<a href="/myproject/s/permanentUserAuctionHistory?aid=${auctionDo.auctionId}">
${auctionDo.auctionId}
</a>