Question 1
Here's my project folder,
How can I call images folder from UploadContoller?
I already tried with
request.getServletContext().getRealPath("/images");
But it didn't work.
Question 2
How can I call images > a1.jpg from view > a..jsp?
I already tried with
<img src="/images/a1.jpg">
But it didn't work
SECOND PART
The problem is ok only when i strore my project like (C:\myproject). The problem is When is save my project in other location like (D:\NewFolder\myproject).
Way 1
request.getServletContext().getRealPath("");
--> C:\SpringToolSuite\sts-bundle\pivotal-tc-server-developer-3.2.2.RELEASE\base-instance\wtpwebapps\myproject\
Way 2
request.getContextPath() + "/images/";
-->/myproject/images/
Why i cannot file my project real location. Right Now, my project is under
C:\Users\Star\Downloads\myproject