I am stuck with this problem from last few hours. I am using Servlets and jsp pages. In the below code I used scriplet to use values passed to jsp page from servlet.
display
is a string of array in the form of id, image-path, id2, imag-path2, id3, image-path3, id4 ......
I am using these images as a href. Now I need to pass id values to the href servlet.
Could you please suggest what is the best way I can achieve that?
<div class="get-images-class">
<%
String[] display = (String[])request.getAttribute("images");
if (display != null && display.length != 0)
{
for(int i=0; i<display.length; i++)
{ out.println(display[i]);
i++;%>
<a href="ImageBrowseServlet"><img src="<%=display[i]%>" alt="image missing"></a>
<%}
}
%>
</div>