Tomcatサーバー上に静的ファイル(例:html)を読み込む際に他の人に見られた問題があります。 guide on accessing local files from a tomcat serverに続いて、私は<Context docBase="F:/Sprint000" path="/static" />
をserver.xml
ファイルに追加しました。私は404エラーを取得し続けます。私はルートフォルダが `webapps 'であると仮定していますか?Tomcatサーバーに静的ファイルをロードする
アイデア?
ディレクトリ:ファイルcontext.xml
をお探しwebapps/Sprint000/index.htm
Server.xmlを
<Engine name="Catalina" defaultHost="localhost">
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
<Realm className="org.apache.catalina.realm.LockOutRealm">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
Documentation at: /docs/config/valve.html -->
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
<Context docBase="/Sprint000" path="/static" />
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
</Engine>
に '文書ベース= ...'を変更してみてください絶対パス。 –