"Not allowed to load local resource: file:///C:....jpg" Java EE Tomcat -
i'm trying retrieve picture file system after storage,(instead of putting in database copy disc , put path db)
- i had store picture c:\images\ folder , supposing name complete path c:\images\mypic.jpg
- when try retrieve set img src attribute
<img src="c:\images\mypic.jps">
using java code - in browser console found error
not allowed load local resource: file:///c://images//mypic.jpg
question: how fix these path problem ? should store pictures ? , should retrieve them ?
sending tag <img src="c:\images\mypic.jpg">
cause user browser access image filesystem. if have store images in folder located in c:\images
suggest create servlet images.jsp, parameter takes name of file, sets servlet response content image/jpg , loads bytes of image server location , put response.
but use create application? pure servlet? spring? jsf?
here can find info about, how it.
Comments
Post a Comment