0

I have tried this Simplest way to serve static data from outside the application server in a Java web application. I add this to my server.xml(D:\apache-tomcat-9.0.0.M22\conf)Inside the<Host> tag . But it did not work.

<Context docBase="C:\java workspace\picture" path="/images" />

I think if it because I am using the Intellij idea? Because the idea will create a new instance of tomcat at C:\Users\lxa\.IntelliJIdea2017.2\system\tomcat\_drill_3\conf? I can not change the web.xml of the C:\Users\lxa\.IntelliJIdea2017.2\system\tomcat\_drill_3\conf

lxacoder
  • 191
  • 1
  • 11

1 Answers1

0

FromRun/Debug Configurations Select Startup/Connection and then check Pass environment variables and add a new entry: CATALINA_BASE with your Tomcat address

Soheil Ghahremani
  • 1,135
  • 1
  • 16
  • 36