IntelliJ Tomcat Server plugin fails to auto-populate my empty external Tomcat `base` folder

独自空忆成欢 提交于 2019-12-30 11:53:25

问题


When I point the Tomcat and TomEE Integration plugin in IntelliJ Ultimate 2017.2 via menu item Run > Edit Configurations to a fresh download of Tomcat 8.5.16, my Vaadin 8.1 app runs successfully. Good.

But when I optionally point the configuration’s Server > Application Server > Configure button > Tomcat base directory to an empty folder, I get a message:

Cant find directory 'Users/basilbourque/apache-tomcat-base-dev/conf'

➠ Must I create this conf folder?

In contrast to IntelliJ, when I point NetBeans IDE to an empty folder when running Tomcat externally, it automatically populates the empty folder with the entire hierarchy of folders and files needed to run the app.

So, okay, I create a conf folder in my otherwise empty folder. This satisfies the Edit Configurations panel. Next, I run my app by running this configuration.

Notice how Unnamed_ is prepended to my application name (timepiece), I get this message in a floating dark-red box within the IntelliJ IDE window:

Error running 'Tomcat 8.5.16'

Cannot load /Users/basilbourque/Library/Caches/IntelliJIdea2017.2/Unnamed_timepiece/conf/server.xml: /Users/basilbourque/Library/Caches/IntelliJIdea2017.2/tomcat/Unnamed_timepiece/conf/server.xml (No such file or directory) (5 minutes ago)

➠ Must I create a server.xml?

Such a requirement confuses me given that as I said above, NetBeans simply populates the external Tomcat "base" empty folder as needed entirely and automatically.

I am also curious why the message repeats the same path with a colon in the middle, though that is a minor issue.


回答1:


This directory is used to have the configuration that is different from the default Tomcat conf in the root of the server installation.

  1. Copy TOMCAT_HOME/conf into CATALINA_BASE/conf.
  2. Select this new CATALINA_BASE in the IntelliJ Run > Edit Configurations dialog.

This way you can have the same physical installation of the server, but run multiple server instances with different configurations. IntelliJ IDEA expects the pre-configured CATALINA_BASE from you, it will not populate it automatically.



来源:https://stackoverflow.com/questions/45477139/intellij-tomcat-server-plugin-fails-to-auto-populate-my-empty-external-tomcat-b

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!