how to show image upload to tomcat server with html tag img

0

After uploading the images to the server I can not figure out how to display it using an html tag. What is the server path?

The issue is that I'm not clear on what location to save it to later be able to access it and show it through an image html tag. In my application using a form I create a file to register a rose and one of its fields is file type to upload a photo of the rose. I upload the image and store it in mysql using a blob type field. Later on, if a user wants to see the image, I retrieve it from the database and that's where I'm not clear about where to store it so I can show it through the html tag.

    
asked by berni10 02.09.2016 в 00:32
source

1 answer

0

If your site is www.sitio.com and the images are in the img directory inside the site root, you just have to put

<img src="img/imagen1.jpg">

Always put the relative path from where your page is running

    
answered by 02.09.2016 в 08:35