search
HomeJavaJavaBaseThe picture of the project accessed under the url in java is not displayed

The picture of the project accessed under the url in java is not displayed

Dec 18, 2019 am 11:15 AM
javaurlDo not showpictureaccessproject

The picture of the project accessed under the url in java is not displayed

img tag: The following

<img  src="/static/imghwm/default1.png"  data-src="http://localhost:8080/MyThreeWeb/image/upload/62f392ba466e40db84f78302e727db35_Koala.jpg"  class="lazy"   / alt="The picture of the project accessed under the url in java is not displayed" >

is recommended to be replaced with

<img  src="/static/imghwm/default1.png"  data-src="/MyThreeWeb/image/upload/62f392ba466e40db84f78302e727db35_Koala.jpg"  class="lazy"   / alt="The picture of the project accessed under the url in java is not displayed" >

, which is the specific path to access this project starting from the project name.

Related video tutorial sharing: java online video

If the browser directly accesses it, please check whether the image is included in the actual deployed container.

For example: tomcat in eclipse

工作区间\.metadata\.plugins\org.eclipse.wst.server.core\tmp数字【数字代表是第几个创建的项目,从0开始】
\wtpwebapps\项目名

Then check whether the specific image of the path is generated.

The specific operation is:

1.controller layer: the saving directory of uploaded files:

String savePath = this.getServletContext().getRealPath("image/upload");

2.jsp layer: <img src="%24%7B%20map.pic%20%7D" alt="The picture of the project accessed under the url in java is not displayed" >This is the direct access address of the browser

3. Data layer storage

http://localhost:8080/MyThreeWeb/image/upload/62f392ba466e40db84f78302e727db35_Koala.jpg

Recommended related articles and tutorials: Getting started with java

The above is the detailed content of The picture of the project accessed under the url in java is not displayed. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools