hello all! i am having an application in which after search some results are available and need to be displayed.what i dont know is how i could display an image in my jsp page..i have this code:
and then to display the image i try the following,which doesnt work:)
when i use <img src="<%=myMovie.getImagePath();%>" alt="movieImage"/> then i get an error.so i use <img src="<%=myMovie.getImagePath()%>" alt="movieImage"/> but my image doesnt appear...
Natasa's advice is correct. I believe the ";" where simply typos. Have you checked the value of image path. Open the page in your browser and select view source and copy the value of IMG.SRC to another window. Verify that the image path points to image's home on the web. Check to see if you get a 404, 500, 403, etc.
Sometimes a quick visuall inspection is all that is needed to discover the root of the problem.
In your original question you did not specify if the image itself was stored in the database, file system, etc.
Can you post the value of myMovie.getImagePath()? This would help us help you.