Update Jetty packages (major) #103

Open
renovate[bot] wants to merge 46 commits from renovate/major-jetty-packages into main
Showing only changes of commit a943124d45 - Show all commits

View file

@ -16,11 +16,12 @@
package helma.main;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.util.resource.URLResourceFactory;
import org.eclipse.jetty.xml.XmlConfiguration;
import java.net.URL;
@ -36,18 +37,20 @@ public class JettyServer {
public static JettyServer init(Server server, ServerConfig config) throws IOException {
File configFile = config.getConfigFile();
if (configFile != null && configFile.exists()) {
return new JettyServer(configFile.toURI().toURL());
URLResourceFactory resourceFactory = new URLResourceFactory();
Resource resource = resourceFactory.newResource(configFile.toURI());
return new JettyServer(resource);
} else if (config.hasWebsrvPort()) {
return new JettyServer(config.getWebsrvPort(), server);
}
return null;
}
private JettyServer(URL url) throws IOException {
private JettyServer(Resource resource) throws IOException {
http = new org.eclipse.jetty.server.Server();
try {
XmlConfiguration config = new XmlConfiguration(url);
XmlConfiguration config = new XmlConfiguration(resource);
config.configure(http);
} catch (IOException e) {