简体   繁体   English

如何通过<a href>使用jstl</a>将值从jsp传递到servlet

[英]how to pass values from jsp to servlet through <a href> using jstl

I want to send values from a jsp to the servlet via href.. but i dont know how to append the data.. pls use jstl tags only no servlets pls... i checked this pass values from jsp to servlet using <a href> but they utilize scriplets.. 我想通过href将值从jsp发送到servlet。.但我不知道如何追加数据。.请仅使用jstl标签而不使用servlet。...我使用<a href检查了从jsp到servlet的传递值>但是他们利用了小片段。

 <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>

Double quote (") after aid= inside the href attribute breaks the href . 后双引号(“) aid=内部href属性打破了href

You can just use JSTL 您可以只使用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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM