java - JSP template inheritance -


Coming from a background in Django, I often use "template succession", where many templates are derived from the general base. Is there an easy way to do this in JSP? If not, there is no alternative to JSP (it is Jethon on Jethon :)

base template

   

Basic content

  {% "base template"%} {% block content%} extension & lt; H1 & gt; {{Content.title}} & lt; - Fills in a variable & lt; / H1> {{Content.body}} & lt; - Fills in another variable {% endblock%}  

will be presented as follows (assuming that conten.title "Insert Title Here", and the content is ".body" here Body insert ")

  & lt; Html & gt; & Lt; Body & gt; & Lt; H1 & gt; Enter title here & lt; - Fills in a variable & lt; / H1> Body Enter Here & lt; - Fills in another variable & lt; / Body & gt; & Lt; Html & gt;  

You probably want to see.

EDIT: On a related note for tiles, you may want to check. It is not what you are looking for (for tiles), but it is useful for anyone coming from Django.


Comments