私はこれを試しましたSimplest way to serve static data from outside the application server in a Java web application。これを私のserver.xml(D:\apache-tomcat-9.0.0.M22\conf
)に追加します。<Host>
タグの内側にあります。しかし、それは動作しませんでした。webapp(何らかの理由でWebアプリケーションディレクトリ)から静的ファイルにアクセスするにはどうすればよいですか?
<Context docBase="C:\java workspace\picture" path="/images" />
私はIntellijのアイデアを使用していると思いますか?アイデアはC:\Users\lxa\.IntelliJIdea2017.2\system\tomcat\_drill_3\conf
にtomcatの新しいインスタンスを作成するので、私はRun/Debug Configurations
選択Startup/Connection
からC:\Users\lxa\.IntelliJIdea2017.2\system\tomcat\_drill_3\conf