欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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

程序员文章站 2022-04-26 14:06:56
...
两种方法
懒得翻译,都是摘抄的

第一种
来自于
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:
IDEA修改tomcat的server.xml配置方法
            
    
    博客分类: IDE tomcatideaserver.xmlconfig