Why does Intellij-IDEA ignore my tomcat/conf/server.xml Context tag?

后端 未结 4 1186
天命终不由人
天命终不由人 2020-11-29 04:29

In my $TOMCAT_HOME/conf/server.xml I put this near the bottom:

...

                   


        
相关标签:
4条回答
  • 2020-11-29 05:10

    I was need ROOT context in Tomcat/IntelliJ, so in server.xml in Host tag, add specific Context :

    <Context path="" docBase="C:\intranet\app\tomcat\webapps\ROOT\" reloadable="true" />
    

    In intelliJ 11.1.5, in Server tab panel check box "Deploy applications configured in Tomcat instance", IntelliJ will copy server.xml in folder deployment :

    C:\Users\{Username}\.IntelliJIdea11\system\tomcat\Unnamed_Product_2\conf"
    

    Now I can access to resources in Root domain, by example crossdomain.xml :

    http://localhost:8080/crossdomain.xml
    
    0 讨论(0)
  • 2020-11-29 05:12

    In Startup/Connection tab add the data as mentioned below in ' Pass environment variables ' section. Restart and that's it.

    Name           Value
    ------------   -----
    CATLINA_BASE   {Tomcat Installation directory}
    
    0 讨论(0)
  • 2020-11-29 05:15

    By default IntelliJ IDEA modifies CATALINA_BASE environment so that Tomcat uses adjusted configuration files for deploying applications directly from the artifact output location, however it's possible to override this behavior and configure everything manually (either by changing the artifact output to go into webapps or by changing the server configuration in the same way IDEA does so that deployment occurs from the standard artifact output).

    0 讨论(0)
  • 2020-11-29 05:32

    I copied servers and found that my log files are stored in the wrong location.

    So for the "Tomcat prod" it was actually using catalina.base=".../preprod/..."

    I ended up editing projects/.idea/workspace.xml which was next to where I installed IntelliJ

    0 讨论(0)
提交回复
热议问题