[stringtemplate-interest] Feature Request for StringTemplate v4: STGroupDir taking URL parameter
Terence Parr
parrt at cs.usfca.edu
Thu Mar 4 14:56:07 PST 2010
I added
public STGroupDir(URL root, String encoding,
char delimiterStartChar, char delimiterStopChar)
{
super(delimiterStartChar, delimiterStopChar);
this.root = root;
this.encoding = encoding;
}
and
public STGroupFile(URL url, String encoding,
char delimiterStartChar, char delimiterStopChar)
{
super(delimiterStartChar, delimiterStopChar);
this.url = url;
this.encoding = encoding;
}
Will that work?
Ter
On Mar 4, 2010, at 1:24 PM, Cliff Zhao wrote:
> Terence,
> I would like to see another set of STGroupDir constructors that take an URL instead of dirName. It will give me a great flexibility to integrate StringTemplate into a web application. That way, I can put my templates into /WEB-INF/templates and use servletContext.getResource("/WEB-INF/templates") to get the group URL, then initialize the STGroupDir by new STGroupDir(url, '$','$').
>
> Thank you very much.
>
> Best Regards,
> Cliff Zhao
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
More information about the stringtemplate-interest
mailing list