Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Simple JSP question

 
Anurag Saxena
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is my jsp page that contains the following:
...
<TABLE BORDER=1 WIDTH="75%" >
<tr>
<td Width=20%><%= kp.getSerialNo() %></td>
<td Width=20%><a href="TransactionRecord.jsp?serialNo=kp.getSerialNo()">Transaction Record</td>

</tr>
</table>
...
I want to call another JSP(TransactionRecord.jsp) via hyperlink click. How do I pass the
value of "kp.getSerialNo()" ? The way I am doing is not working.
Thanks
 
Rob Misek
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anurag,
One way to do this is to build the String first and then fill in the "a href".
<%
String sUrl = "TransactionRecord.jsp?serialNo=" + kp.getSerialNo();
%>
<a href="<%=sUrl%>">
I think that should work.
Later,
 
Bhupinder Dhillon
Ranch Hand
Posts: 124
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or you could try putting the bean method call in an expression tag <%= kp.getSerialNo() %>
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic