Announcement Announcement Module
Collapse
No announcement yet.
Template engine + JSTL Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Template engine + JSTL

    Hi,

    I've heard a little bit about Velocity, Freemarker and what template engines can do for you in general. However, as far as I've read so far, when using one of them, you can not use JSTL in the same view. Although I know that this is not recommended, I think that there are cases were you might need this, e.g. when migrating from a JSTL-based project.

    So: Is there a template engine that is supported by Spring (MVC), that allows using JSTL and executing Java (I know ...) in the JSPs as well?

    Thanks in advance,
    Simon

  • #2
    Freemarker supports taglibs. from http://freemarker.org/:
    Web-ready

    * Built-in constructs in the template language to handle typical Web related tasks like HTML-escaping.
    * Can be integrated with "Model 2" Web application frameworks out-of-the-box as JSP replacement.
    * Supports JSP taglibs.
    * Designed for MVC pattern: separate visual design from application logic, separate page designers from programmers.

    Comment


    • #3
      Hi,

      thanks, that already helped me a lot. I've tried equinox-freemarker which seems very nice to me; however, when I try something like

      <% out.println("foo"); %>,

      the hole thing, including the <%, is printed out directly. How can I make Freemarker execute JavaCode inside the pages?

      Thanks a lot,
      Simon

      Comment


      • #4
        Any thoughts?

        Thanks,
        Simon

        Comment


        • #5
          If you want to use jstl and taglibs, *why not* use jsps?

          Comment


          • #6
            Because I'd like to use the benefits the engines would give me (templates) as well.

            Simon

            Comment

            Working...
            X