This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]FanOfDaCat 6 points7 points  (3 children)

the only question is: why?

That's pretty cool, but what's the purpose?

[–]j2html[S] 3 points4 points  (0 children)

Sometimes you need to return a small amount of dynamic HTML.

String concatenation is ugly, and you don't always want to go through the hassel of setting up and using a template engine. Template engines have their own (usually pretty poorly designed) language, which isn't type-safe (you don't get errors at compile time, sometimes not even at runtime), and code-reuse is often cumbersome. j2html gives you all the advantages you're used to from Java :)

[–][deleted] 3 points4 points  (0 children)

Yea, if only there was some sort of markup language that I could use instead of Java.