0

i really like JSPs as template system and i'm looking for a static site generator that has JSP-like capabilities.

What i really find useful in JSP is that tag files are very powerful and flexible, for instance, you can define a "master" layout as a tag file, have "child" layouts reusing other tag files and even define "components" as tag files, and thus creating new pages/views becomes very easy reusing layouts and components.

The only downside is that JSP is tied to the JVM, is there any static site generator that has these capabilities ?.

thanks in advance

RRoman
  • 741
  • 9
  • 19
  • 2
    I don't quite understand, you could easily use JSPs to generate static files. Or do you just fundamentally want to avoid involving the JVM at all? I'm sure there's plenty of templating systems out there that match your general description. – Joachim Sauer Sep 16 '21 at 21:51
  • 1
    There are dozens of templating mechanisms available. – Dave Newton Sep 16 '21 at 22:35

1 Answers1

2

JSP is not a template system, per se; actually, it's a servlet, written as a JSP file, for the sake of writing servlets that have a lot of static content (HTML tags, divs, etc.) and just tiny amount of dynamic - in an easier way.

I'm not sure I understand what does "static site generator" mean, especially, when you're looking for "JSP-like capabilities" - which smells, like you want to have a dynamic logic in it.

Reusing some parts of the website is easily available in HTML as well, and you don't need JSP for that.

I also don't understand why it is a downside of JSP, that it's tied to the JVM, as it exists for the sake of implementing dynamic web pages.


I think, your question contains contradiction in itself. On one side, you want to have a static .html files, without any underlying system, and on the other hand, you seem to be wanting to have a dynamic content generation capability.

Your question is unclear.

Giorgi Tsiklauri
  • 9,715
  • 8
  • 45
  • 66