On the jsp page, img uses tomcat configuration to display images in the absolute path of the Access Server,
1. Open the server. xml file under tomcat and go to the \ apache-tomcat-7.0.62 \ conf folder.
2. Add
The Code is as follows:
<Host name = "localhost" appBase = "webapps"
UnpackWARs = "true" autoDeploy = "true">
<! -- SingleSignOn valve, share authentication between web applications
Documentation at:/docs/config/valve.html -->
<! --
<Valve className = "org. apache. catalina. authenticator. SingleSignOn"/>
-->
<! -- Access log processes all example.
Documentation at:/docs/config/valve.html
Note: The pattern used is equivalent to using pattern = "common" -->
<Valve className = "org. apache. catalina. valves. AccessLogValve" directory = "logs"
Prefix = "localhost_access_log." suffix = ". txt"
Pattern = "% h % l % u % t & quot; % r & quot; % s % B"/>
<Context path = "/ompa/uploads/" docBase = "G: \ ompa \ uploads \" reloadable = "true"> </Context>
</Host>
3. Start the tomcat deployment project. The jsp code is as follows:
<! --/Ompa/uploads/is consistent with <Context path = "/ompa/uploads/"...>