logo       

Platform specific line feeds in template files: msg#00141

jakarta.velocity.user

Subject: Platform specific line feeds in template files

I have templates created on Windows (i.e. with cr/lf) for some complex SQL
statements. When running the code on Unix, I'd like the output to have the
Unix line separator (lf).

Before I add code to do this myself, is there a way of controlling this
behaviour in Velocity?

The templates are loaded by
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader using a
call to Velocity.mergeTemplate with an encoding of ISO-8859-1 with output to
a StringWriter.

Thanks,
Keith


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise