figuring out, what is wrong with maven-built jar
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>de.srsoftware</groupId>
|
<groupId>de.srsoftware</groupId>
|
||||||
<artifactId>web4rail</artifactId>
|
<artifactId>web4rail</artifactId>
|
||||||
<version>0.11.16</version>
|
<version>0.11.17</version>
|
||||||
<name>Web4Rail</name>
|
<name>Web4Rail</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<description>Java Model Railway Control</description>
|
<description>Java Model Railway Control</description>
|
||||||
|
|||||||
@@ -206,6 +206,7 @@ public class Application extends BaseClass{
|
|||||||
File file = new File(System.getProperty("user.dir")+"/resources"+uri);
|
File file = new File(System.getProperty("user.dir")+"/resources"+uri);
|
||||||
LOG.debug("requesting file: {}",file);
|
LOG.debug("requesting file: {}",file);
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
|
LOG.debug("found...");
|
||||||
client.getResponseHeaders().add("Content-Type", Files.probeContentType(file.toPath()));
|
client.getResponseHeaders().add("Content-Type", Files.probeContentType(file.toPath()));
|
||||||
client.sendResponseHeaders(200, file.length());
|
client.sendResponseHeaders(200, file.length());
|
||||||
OutputStream out = client.getResponseBody();
|
OutputStream out = client.getResponseBody();
|
||||||
@@ -217,6 +218,7 @@ public class Application extends BaseClass{
|
|||||||
out.close();
|
out.close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
LOG.debug("not found...");
|
||||||
sendError(client,404,t("Could not find \"{}\"",uri));
|
sendError(client,404,t("Could not find \"{}\"",uri));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user