Home | News | Wiki | About StringTemplate | Feedback | Support | Bugs


Latest version is 3.2.1.
Download now! »

Download
Terence Parr What is StringTemplate?
StringTemplate is a java template engine (with ports for C#, Python, and Ruby) for generating source code, web pages, emails, or any other formatted text output. StringTemplate is particularly good at multi-targeted code generators, multiple site skins, and internationalization/localization. It evolved over years of effort developing jGuru.com. StringTemplate also generates this website and powers the ANTLR v3 code generator. See the Five minute introduction.

Its distinguishing characteristic is that it strictly enforces model-view separation unlike other engines. Strict separation makes websites and code generators more flexible and maintainable; it also provides an excellent defense against malicious template authors. There are currently about 600 StringTemplate source downloads a month.

Terence Parr is the maniac behind both StringTemplate and ANTLR. He is a professor of computer science at the University of San Francisco.

More...

Testimonials

ANTLR and StringTemplate are good ways of doing things. Terence has created...
Christian Schladetsch

After some years of using ANTLR and StringTemplate, I find these set of...
Gevik Babakhani

We use StringTemplate as our presentation engine for our rapid code development...
Bediako George

We use StringTemplate in lots of the project here in the company. The ...
e4s3

More...

Showcase
Yahoo! Query Language
Submitted by Terence Tue Aug 25, 2009 18:32
Yahoo! uses ANTLR for its query language. The Yahoo! Query Language is...

StringTemplate ViewEngine for ASP.Net MVC
Jamison Morrow Fri Feb 13, 2009 11:47
ViewEngine that utilizes ST for the ASP.Net MVC Framework.

Apache Camel string-template: component
Terence Parr Mon Jan 26, 2009 17:02
Looks like Camel has a wrapper for the Java ST implementation.

More...


Search


News
StringTemplate v4 early access
Terence Parr Wed Jan 13, 2010 11:10
I think it works but need some more people to test.

StringTemplate 3.2.1 (Java) released
Terence Parr Fri Sep 25, 2009 15:35
Bug fix release mostly.

StringTemplate 3.2 released
Terence Parr Wed Jun 11, 2008 02:56
A bug fix release with a few small improvements.

ST C# 3.1 beta available
Kunle Odutola and Michael Jordan Tue Mar 4, 2008 12:38
C# 3.1 beta; just code updated; not unit tests nor doc/readme.

More...
File Sharing
struts2 support for StringTemplate
Ran Tavory Sat Nov 7, 2009 13:22
struts2 support for StringTemplate if anyone is interested. It's still...

http://code.google.com/p/webfabric/
Daniel Worthington-Bodart Mon Sep 28, 2009 14:30
Just thought I'd let you know of a couple of extensions I have created...

st to struts adapter
harry.karadimas@hmn.aphp.fr Mon Dec 15, 2008 05:31
A set of objects that enables st to be used as a view

STST - StringTemplate Standalone Tool
John Snyders Sun Dec 30, 2007 13:20
StringTemplate Standalone Tool (STST) is a command line utility for processing...

More...
Documentation
StringTemplate main documentation

StringTemplate 3.2.1 release notes

StringTemplate course notes

API

source/changelogs at github

Bugs

Changes

Mailing List Messages
Subject: dealing with empty list values
Joshua Royalty Mon, 8 Feb 2010 19:11:51 -0800

Subject: dealing with empty list values
Terence Parr Mon, 8 Feb 2010 13:51:20 -0800

Subject: Use case supported by ST?
Ronald Muller Mon, 8 Feb 2010 09:20:36 +0100

Subject: dealing with empty list values
Joshua Royalty Sun, 7 Feb 2010 17:02:26 -0800

More...
Articles
Generating Structured Text with StringTemplate
Michael Ceranski [submitted by Terence] Mon Feb 8, 2010 12:34
In order to get familiar with the functionality lets start by looking at...

Clojure and StringTemplate
submitted by Terence Parr Fri Jan 22, 2010 16:14
An example using ST in Clojure.

StringTemplate ? a step forward to a better web MVC
Ran Tavory Thu Nov 19, 2009 12:18
StringTemplate is a step forward true MVC implementation, but before presenting...

Toy ST implementation
Terence Parr Thu Oct 8, 2009 14:39
I'm in the process of rebuilding ST from the ground up to make ST v4. I...

More...