working on css
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user