C:\ asset(我有像.jpg / 2.jpg / 3.jpg等图片)
我的tomcat server.xml如下所示:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="/test" docBase="C:/asset" debug="0" reloadable="true" crossContext="false"/>
<!-- 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 "%r" %s %b" />
</Host>
仍然当我去localhost:8080 / test / 1.jpg我有404错误任何想法为什么这不起作用?
另一个问题是有可能在我的春季项目中配置这条路径吗?作为变量?