figuring out, what is wrong with maven-built jar

This commit is contained in:
Stephan Richter
2020-11-13 18:35:26 +01:00
parent 6cffc21ca2
commit 56d19ddcf1
2 changed files with 3 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.srsoftware</groupId>
<artifactId>web4rail</artifactId>
<version>0.11.16</version>
<version>0.11.17</version>
<name>Web4Rail</name>
<packaging>jar</packaging>
<description>Java Model Railway Control</description>

View File

@@ -206,6 +206,7 @@ public class Application extends BaseClass{
File file = new File(System.getProperty("user.dir")+"/resources"+uri);
LOG.debug("requesting file: {}",file);
if (file.exists()) {
LOG.debug("found...");
client.getResponseHeaders().add("Content-Type", Files.probeContentType(file.toPath()));
client.sendResponseHeaders(200, file.length());
OutputStream out = client.getResponseBody();
@@ -217,6 +218,7 @@ public class Application extends BaseClass{
out.close();
return;
}
LOG.debug("not found...");
sendError(client,404,t("Could not find \"{}\"",uri));
}