Results 1 to 6 of 6

Thread: Template engine + JSTL

  1. #1

    Default 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. #2
    Join Date
    Aug 2005
    Posts
    10

    Default

    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.

  3. #3

    Default

    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

  4. #4

    Default

    Any thoughts?

    Thanks,
    Simon

  5. #5
    Join Date
    Aug 2004
    Posts
    1,905

    Default

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

  6. #6

    Default

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

    Simon

Similar Threads

  1. Spring-based Mail Template Framework
    By eisenb in forum Architecture
    Replies: 3
    Last Post: Dec 2nd, 2010, 07:24 AM
  2. Load JSTL views from outside the web-app
    By MattiasR in forum Web
    Replies: 2
    Last Post: Aug 15th, 2005, 05:17 AM
  3. Hibernate Template or AOP Interceptor?
    By etienno in forum Data
    Replies: 1
    Last Post: Apr 15th, 2005, 02:44 AM
  4. JSTL 1.0 why?
    By robododge in forum Web
    Replies: 4
    Last Post: Nov 11th, 2004, 12:52 PM
  5. which Template Engine
    By Gideon in forum Web
    Replies: 8
    Last Post: Nov 9th, 2004, 02:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •