i am trying to develop an application on Shopping cart. in that i am getting problem , i am not able to display the image of the purchaged items in the Cart. I am not storing the image in database, i am using the location of image , here in this code <img src="<% out.println("\""+lc+"\""); %>" width="143" height="129" hspace="2" vspace="2" border="0"> . by using "<% out.println("\""+lc+"\""); %>" i tried to give the value to the
src attribute but its not working. in the "CART" attribute image location value is there. or if there is any other method please help me .......... thanks
Hint: Look in the browser and do "View Page Source". If you then see that it isn't generating the right contents for that src attribute, then fix your scriptlet to generate the right contents.
I haven't used scriptlets for years because they are totally obsolete, so I don't know if I'm right any more, but if you are stuck with maintaining an old system from years and years ago, ask yourself why <%=lc%> isn't good enough in that position.
Joined: Jun 02, 2012
i used already <%=lc%> as the value of src attribute but it not displaying the images.