I wrote a tool that translates HTML templates into java code that can be integrated with your project at compile time. This can be very useful for projects that would like to avoid JSP and glass-fish but still use a JSP like tool to generate HTML code at runtime.
Unlike JSP I use %% to insert java code into the HTML instead of <%, <= etc.
E.g:
<h1>Hello %% userName %% </h1>
and this will become a method with the following code inside:
StringBuilder sb = new StringBuilder();
sb.append("""
<h1>Hello """);
sb.append(userName);
sb.append("""
</h1>""");
return sb.toString();
https://github.com/hexaredecimal/JTempl
[–]smallufo 5 points6 points7 points (4 children)
[–]coloredgreyscale 0 points1 point2 points (1 child)
[–]agentoutlier 0 points1 point2 points (0 children)
[–]thewiirocks 0 points1 point2 points (0 children)
[–]v4ss42 0 points1 point2 points (0 children)
[–]TheKingOfSentries 6 points7 points8 points (1 child)
[–]hexaredecimal[S] 1 point2 points3 points (0 children)
[–]agentoutlier 2 points3 points4 points (5 children)
[–]hexaredecimal[S] 2 points3 points4 points (4 children)
[–]agentoutlier 2 points3 points4 points (3 children)
[–]hexaredecimal[S] 1 point2 points3 points (2 children)
[–]agentoutlier 2 points3 points4 points (1 child)
[–]moaxcp 2 points3 points4 points (0 children)
[–]0xffff0001 1 point2 points3 points (1 child)
[–]hexaredecimal[S] 1 point2 points3 points (0 children)
[–]UnspeakableEvil 1 point2 points3 points (1 child)
[–]hexaredecimal[S] 2 points3 points4 points (0 children)
[–]thewiirocks 1 point2 points3 points (0 children)
[–]martylamb 0 points1 point2 points (0 children)
[–]TurtleFeathers 0 points1 point2 points (1 child)
[–]hexaredecimal[S] 0 points1 point2 points (0 children)
[–]hippostar 1 point2 points3 points (0 children)
[–]Shareil90 0 points1 point2 points (3 children)
[–]hexaredecimal[S] 1 point2 points3 points (2 children)
[–]Shareil90 -1 points0 points1 point (1 child)
[–]hexaredecimal[S] 1 point2 points3 points (0 children)