Tomcat Config - catalina.properties
Hi all,
I have a run configuration that uses a tomcat server with the home directory of the tomcat server files and the base directory are the conf files from the development server.
In the server.xml it uses the catalina.properties to populate the properties, for example:
<Host name="${base.hostname}"
In the catalina.properties, base.hostname is populated.. in this instance base.hostname=localhost
When I start the configuration, intellij gives me the "server.xml does not contain virtual host 'localhost'...
So I change the server.xml to <Host name="localhost" and this intellij error goes away, is there anyway of getting intellij to use the properties file, or turning this off? I don't want to go through the server.xml and populating all the properties references.
Thanks.
C.
Please sign in to leave a comment.
Have you modified the default Tomcat installation and/or Tomcat Server Run/Debug Configuration?
Does this work if you start Tomcat from the command line?
I haven't modified the default Tomcat installation, it is as it was when I extracted it from the archive file.
I created a new Tomcat Server Run/Debug Configuration and set up the home as the Tomcat installation and the base is another directory with the Tomcat "conf" directory from the development server. This conf has the server.xml etc inside.
When I run it from the command line by setting the CATALINA_HOME as the Tomcat installation and the CALALINA_BASE as the other directory, Tomcat starts up, but I am not seeing this "server.xml does not contain virtual host 'localhost'" error.
CATALINA_HOME and CALALINA_BASE must point by default into the Tomcat installation directory, where the conf directory is located. If you did not modify the Tomcat installation please set them to same directory:
I have same issue. Downloaded apache tomcat 7.0.109 for windows x64, I am using openjdk 1.8_332 from openlogic for my project. In IDEA Run configuration for local Tomcat I've set up to use this downloaded tomcat, it placed both home and base directory to same path.
And only thing I changed in tomcat is I added my own catalina.properties, context.xml and server.xml that are using placeholders to define datasource values.
When I start run configuration I get
I have this placeholder defined in my catalina.properties
Everything works when I start tomcat from terminal , but when I use Intellij IDEA Tomcat run configuration it just doesnt care about properties defined in catalina.properties.
Btw my Intellij is Build #IU-213.7172.25
My mistake I had additional placeholders in xml defined, but didnt have them in catalina.properties.
It is working as expected. Sorry