The problem of website image path: absolute path / virtual path


First of all, pictures and projects are not in the same drive. Pictures can’t be placed under the project.

In the JSP file < img SRC = “C] / users / FX / pictures/ test.jpg “/ > you can’t get pictures like this. Because the JSP page is in the page when quoting pictures, and the parsing path is: < img Src=“ http://localhost :8080/test/images/1.jpg”>。 That is to say, when quoting pictures, JSP goes to your project directory first.

So if you want to introduce pictures of other drive letters into JSP, you can only configure the virtual path.