Executable embedding ok

This commit is contained in:
Claude Brisson
2023-05-14 12:03:42 +02:00
parent 42ad283ee6
commit cbdf336a1c
3 changed files with 8 additions and 2 deletions

View File

@@ -42,6 +42,12 @@ public class JettyBootstrap
File warFile = new File(warLocation.toURI()); File warFile = new File(warLocation.toURI());
System.setProperty("org.eclipse.jetty.livewar.LOCATION",warFile.toPath().toRealPath().toString()); System.setProperty("org.eclipse.jetty.livewar.LOCATION",warFile.toPath().toRealPath().toString());
// CB we want colorized output on linux
if (System.getProperty("os.name").equalsIgnoreCase("linux"))
{
System.setProperty("org.eclipse.jetty.logging.appender.MESSAGE_ESCAPE", "false");
}
Class<?> mainClass = Class.forName("org.jeudego.pairgoth.container.ServerMain",false,clWar); Class<?> mainClass = Class.forName("org.jeudego.pairgoth.container.ServerMain",false,clWar);
Method mainMethod = mainClass.getMethod("main",args.getClass()); Method mainMethod = mainClass.getMethod("main",args.getClass());
mainMethod.invoke(mainClass,new Object[] { args }); mainMethod.invoke(mainClass,new Object[] { args });

View File

@@ -102,7 +102,7 @@ class ApiServlet : HttpServlet() {
} }
if (payload != null) { if (payload != null) {
try { try {
logger.logPayload(green(">> "), payload, false) logger.logPayload(">> ", payload, false)
} catch (ioe: IOException) { } catch (ioe: IOException) {
} }
} }

View File

@@ -55,7 +55,7 @@ class WebappManager : ServletContextListener, ServletContextAttributeListener, H
context.setAttribute("manager", this) context.setAttribute("manager", this)
webappRoot = context.getRealPath("/") webappRoot = context.getRealPath("/")
try { try {
properties.load(context.getResourceAsStream("/WEB-INF/webapp.properties")) properties.load(context.getResourceAsStream("/WEB-INF/pairgoth.properties"))
val submaps: MutableMap<String, MutableMap<String, String>> = HashMap() val submaps: MutableMap<String, MutableMap<String, String>> = HashMap()
for (prop in properties.stringPropertyNames()) { for (prop in properties.stringPropertyNames()) {
val value = properties.getProperty(prop) val value = properties.getProperty(prop)