File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Simple JSP question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Simple JSP question" Watch "Simple JSP question" New topic
Author

Simple JSP question

Anurag Saxena
Greenhorn

Joined: Oct 29, 2002
Posts: 13
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

Joined: Sep 24, 2002
Posts: 41
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,


<a href="http://www.tangosol.com" target="_blank" rel="nofollow">www.tangosol.com</a><br /><a href="http://www.tangosol.com/coherence.jsp" target="_blank" rel="nofollow">Coherence:</a> Easily share live data across a cluster!
Bhupinder Dhillon
Ranch Hand

Joined: Oct 12, 2000
Posts: 124
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
 
subject: Simple JSP question
 
Similar Threads
BeanUtils.populate
Display a JSP include in a textarea
Visualizing Struts Froms
How to configure?
Presentation Layer Design question to display multi header / detail html tables