The pictures in the linux server directory become network pictures (via Tomcat)

Modify server.xml in the tomcat directory

Corresponding directory (you can find it through commands, I found it directly through the pagoda)
Insert picture description here

Add the following code in the corresponding position

<Context docBase ="/home/lzh/images" path ="/images" debug ="0" reloadable ="true"/>

Insert picture description here
The directory where pictures are stored under the linux server.
Insert picture description here
View pictures through URL
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_44635198/article/details/113131216