You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by bu...@apache.org on 2004/04/14 12:28:02 UTC
DO NOT REPLY [Bug 28377] New: -
Can't see a reason why Velocity.mergeTemplate(String,Context,Writer) is deprecated
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28377>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28377
Can't see a reason why Velocity.mergeTemplate(String,Context,Writer) is deprecated
Summary: Can't see a reason why
Velocity.mergeTemplate(String,Context,Writer) is
deprecated
Product: Velocity
Version: 1.3.1
Platform: Other
OS/Version: Other
Status: NEW
Severity: Enhancement
Priority: Other
Component: Documentation
AssignedTo: velocity-dev@jakarta.apache.org
ReportedBy: g.hueller@gmx.at
The encoding of template files is well-defined, so I see no reason to deprecate
the method from above.
There is a velocity property input.encoding which defines the encoding
of templates
"Character encoding for input (templates). Using this, you can use alternative
encoding for your templates, such as UTF-8."
I feel that Velocity.mergeTemplate(String,Context,Writer) should simply use
that encoding.
By deprecating the method and referencing to mergeTemplate
(String,String,Context,Writer) you force a developer to duplicate the property.
Suggestion:
IF you decide to keep it deprecated, please extend the javadoc of the long
mergeTemplate method eg:
"
The default encoding that Velocity uses to read template files is defined in
the property input.encoding and defaults to ISO-8859-1.
You can get the encoding that is currently configured in the Velocity runtime
using
"RuntimeSingleton.getString
(RuntimeConstants.INPUT_ENCODING,RuntimeConstants.ENCODING_DEFAULT)"
And you can paste that code for the second parameter of mergeTemplate.
"
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org