IDEA修改tomcat的server.xml配置方法

阅读更多
两种方法
懒得翻译,都是摘抄的

第一种
来自于
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206329989-How-to-configure-additional-context-information-in-Tomcat

To do this, you have to click on Run > Edit Configurations to open the Run/Debug Configurations Dialog. Then open the Tomcat Server tab. Next click on the Startup/Connection sub tab. Select the Run entry. For the Startup script entry unselect "use default". Now click on the Edit button next to the box you just unselected. This opens the Configure VM and Program Parameters dialog. For "Program Parameters" you hav per default the command run. Add -config ]]>, On my system the entry would be:

run -config C:/usr/local/tomcat/apache-tomcat-5.5.15/conf/server.xml

That made IntelliJ using the server.xml in the Tomcat installation which now give me the desired Context configuration.


第二种
To get around this big mess and just use your Tomcat as if you ran it outside of IDEA you simply add a CATALINA_BASE environment variable to the configuration of Tomcat (within IDEA) pointing to your Tomcat directory:

你可能感兴趣的:(tomcat,idea,server.xml,config)