Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/
public class PageGenerator {
private static final String HTML_DIR = "templates";
private static final String MODULE_DIR = "L1.1 Simple web server";

private static PageGenerator pageGenerator;
private final Configuration cfg;
Expand All @@ -32,7 +33,7 @@ public static PageGenerator instance() {
public String getPage(String filename, Map<String, Object> data) {
Writer stream = new StringWriter();
try {
Template template = cfg.getTemplate(HTML_DIR + File.separator + filename);
Template template = cfg.getTemplate(MODULE_DIR+ File.separator + HTML_DIR + File.separator + filename);
template.process(data, stream);
} catch (IOException | TemplateException e) {
e.printStackTrace();
Expand Down