working on css

This commit is contained in:
2022-04-23 01:34:14 +02:00
parent 3ffab25635
commit 0858417fa9
6 changed files with 78 additions and 4 deletions

View File

@@ -29,8 +29,10 @@ public abstract class TemplateServlet extends HttpServlet {
var file = new File(path);
if (!file.exists()) return t("File {} does not exist!",filename);
try {
var content = Files.readString(file.toPath());
resp.getWriter().println(content);
var content = Files.readAllBytes(file.toPath());
var out = resp.getOutputStream();
out.write(content);
out.flush();
} catch (IOException e) {
return t("Failed to load file '{}'!",filename);
}