Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

send value from one jsp to another jsp using href

Tags:

java

jsp

How to send resultset.getInt(1) this value to another jsp page ,I am trying this but not working.

<td><a href="result.jsp?Id="+<%=resultset.getInt(1)%> ><%= resultset.getInt(1) %></a></td>

result.jsp

<% 
String ss =request.getParameter("Id");
System.out.println("my value" + ss);
%>

I m getting "" in result.jsp.

like image 632
Nibha Jain Avatar asked Dec 11 '12 12:12

Nibha Jain


Video Answer


1 Answers

Try this:

<td>
    <a href=<%= "\"result.jsp?Id=" + resultset.getInt(1) + "\"" %> ><%= resultset.getInt(1) %></a>
</td>
like image 151
Azodious Avatar answered Nov 08 '22 08:11

Azodious