Chris Williams
Chris Williams

Reputation: 12481

How do I turn on HTTPS on Tomcat running in Eclipse? (or: How do I edit the server.xml file Eclipse is using when it runs Tomcat?)

I've got Eclipse (Luna 4.4.1) running an external instance of Tomcat (8.0) on the latest version of Mac OS X (10.10.1). I'm able to start/stop the server and hit the deployed apps on port 8080.

I need to turn on HTTPS in that instance. I've tried:

  1. If I double-click on the server in the servers view, I am not able to add anything new under "Ports".
  2. The Tomcat install directory under Preferences->Server->Runtime Environments->Edit looks correct. If I edit the server.xml in that directory's conf directory, it doesn't get picked up.

After searching, I know that Eclipse is running my Tomcat executable with its own server.xml file. Do I just need to find and edit that file? If so, where should I look? If not, is there some other screen in Eclipse to config the server using the GUI?

FWIW, I've used Homebrew to install Tomcat.

Upvotes: 0

Views: 124

Answers (1)

Chris Williams
Chris Williams

Reputation: 12481

I was able to change the "Server Location" so Eclipse doesn't use its own config files and uses the ones in my Tomcat installation directory. I did this by running the server, un-deploying all apps, double-clicking on my server in the "Servers" view, and changing "Server Location" from "Use workspace metadata" to "Use Tomcat installation". Now when I start/stop Eclipse, it picks up my server.xml changes.

Upvotes: 0

Related Questions