1

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.

enter image description here

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.

Community
  • 1
  • 1
Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154

1 Answers1

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.

screenshot of copying "conf" folder from a Tomat folder into an empty base folder

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • 1
    OK, that clarifies things a bit. It would be nice if, when you point to an empty directory, it would pre-populate but let you edit. – Rebeccah Aug 27 '17 at 01:06
  • @Rebeccah Yes, that would be nice. Exactly what [*NetBeans*](https://netbeans.org/) does, point its Tomcat integration module at an empty folder, and it automatically creates all the necessary folders and files needed to run your web app. Frustrating to find this obvious feature lacking in IntelliJ Ultimate edition. – Basil Bourque Jan 07 '18 at 04:16
  • One additional point: At least on macOS, I find it necessary to change the Unix file/folder ownership permissions on the downloaded *Tomcat* folder before copying this `conf`. I use the *BatChmod* app, setting "Group" to "Admin", checking all three R-W-X boxes, and checking all but "Clear xattrs" and "Folders only" checkboxes as discussed in [my Answer](https://stackoverflow.com/a/33057956/642706) to a similar Question about NetBeans. – Basil Bourque Jan 07 '18 at 04:44