JSP tricks to make templating easier?

前端 未结 7 689
猫巷女王i
猫巷女王i 2020-11-22 08:41

At work I\'ve been tasked with turning a bunch of HTML files into a simple JSP project. It\'s really all static, no serverside logic to program. I

7条回答
  •  不思量自难忘°
    2020-11-22 09:29

    I know this answer is coming years after the fact and there is already a great JSP answer by Will Hartung, but there is Facelets, they are even mentioned in the answers from the linked question in the original question.

    Facelets SO tag description

    Facelets is an XML-based view technology for the JavaServer Faces framework. Designed specifically for JSF, Facelets is intended to be a simpler and more powerful alternative to JSP-based views. Initially a separate project, the technology was standardized as part of JSF 2.0 and Java-EE 6 and has deprecated JSP. Almost all JSF 2.0 targeted component libraries do not support JSP anymore, but only Facelets.

    Sadly the best plain tutorial description I found was on Wikipedia and not a tutorial site. In fact the section describing templates even does along the lines of what the original question was asking for.

    Due to the fact that Java-EE 6 has deprecated JSP I would recommend going with Facelets despite the fact that it looks like there might be more required for little to no gain over JSP.

提交回复
热议问题