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);
|
||||
}
|
||||
|
||||
@@ -306,7 +306,12 @@ public class Web extends TemplateServlet {
|
||||
case "jquery":
|
||||
resp.setContentType("text/javascript");
|
||||
return loadFile("jquery-3.6.0.min.js",resp);
|
||||
case UNSUBSCRIBE:
|
||||
case "OpenSans-Regular.woff":
|
||||
resp.setContentType("font/woff");
|
||||
return loadFile("OpenSans-Regular.woff",resp);
|
||||
case "Bhineka.ttf":
|
||||
resp.setContentType("font/ttf");
|
||||
return loadFile("Bhineka.ttf",resp); case UNSUBSCRIBE:
|
||||
data.put(LIST,list.email());
|
||||
return loadTemplate(path,data,resp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user