When Jetty deploys a web application, it looks for a file called WEB-INF/jetty-web.xml
or WEB-INF/web-jetty.xml
within the web application (or WAR) and applies the configuration found there.
This file configures an instance of org.eclipse.jetty.webapp.WebAppContext. Something like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
..
</Configure>
Now, I want to add other configurations to this embedded server, such as SSL support. This requires an instance of org.eclipse.jetty.server.Server
to be configured. I have a file jetty-https.xml
which configures an instance of org.eclipse.jetty.server.Server
and adds the necessary configurations required.
My question is: how do I make jetty use this jetty-https
file.
All my configurations are in XML based. I am running my application through jetty-runner. Version of jetty is: 9.2.**
P.S. I've already searched a lot over the internet. Just don't understand this part.