Closed highspeedlowdraghightechlowlife closed 3 months ago
Welcome!
Could you try to add jte explicitly to your pom as dependency? Maybe it is not pulled in transitively via Javalin?
hey, I found a fix, just need to add it to the config.
Path targetDirectory = Path.of("/jte");
TemplateEngine templateEngine = TemplateEngine.createPrecompiled(targetDirectory, (gg.jte.ContentType.Html));
public static void main(String[] args)
{
Javalin app = Javalin.create(config ->
{
config.fileRenderer(
new JavalinJte(TemplateEngine.createPrecompiled(ContentType.Html)));
}).start(7070);
Trying to deploy JTE project using maven. Works fine in IDE but maven keeps throwing errors. Tried to serve the precompiled templates using the documentation on the website. The templates are precompiling fine but they aren't being rendered.
[JettyServerThreadPool-32] ERROR io.javalin.Javalin - Fatal error occurred while servicing http-request java.lang.NoClassDefFoundError: gg/jte/html/HtmlTemplateOutput
Below is a simplified version of my code: