T want to upload image from my pc and show jsp file but can't. When upload image and after show this image in jsp file image's url is missing. Only show in jsp file this image's path Example: name.jpg. I need all path address .Example : C://dell//....//k.jpg How I solved it? HTml code is here:
<form action="x" method="get">
Urun kategori:<input type="file" name="urunresim"/><p></p>
<input type="submit" value="urunekle"/>
</form>
</body>
</html>
And Example :result is name.jpg but I need all path address.
Knowing the path to the file on the visitor's computer wouldn't be helpful for most situations on the WWW and browsers do not make it possible.
You need to actually upload the file.
method="post"
enctype="multipart/form-data"
Then you'll have access to the uploaded file in your Java and can save it in a location on your webserver that you can work out the URL for.