Issue
I fetched data(some strings) from the database and i covered each string in a link in A.jsp page . Now if clicked a link,then the string that covered by the link is displayed in B.jsp . Here i note that in database i stored an image as a string .So here string is nothing but an image.
<% ResultSet rs=st.executeQuery("Select name,image from base64image");
int ii=0;
while(rs.next()){
if(ii==0)
out.println("<tr>");
ii=1;
%>
<td><a href="B.jsp"> <img src='<%=rs.getString(2)%>' height='200px;' width='200px' />n</a></td>
<%
i++;
if(i%3 ==0 ){
out.println("</tr>");
ii=0;
}
}
out.println("</tr> </table>");
}
Solution
Pass an Id with anchor tag in A.jsp
'<a href="B.jsp?Id="<%rs.getString(1)%>"> <img src='c%></a>
Now in B.jsp retrives all the names 1st column value from the database.If it matches with this id's value,then show the image by using tag
<img src="<%=rs.getString(2)" />
Answered By - Sofi Ullah Saikat