velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 9139] New: - Allow easily add the VelocityWriter to the context of the VelocityServlet
Date Thu, 16 May 2002 01:05:00 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9139>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9139

Allow easily add the VelocityWriter to the context of the VelocityServlet

           Summary: Allow easily add the VelocityWriter to the context of
                    the VelocityServlet
           Product: Velocity
           Version: 1.3-rc1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Source
        AssignedTo: velocity-dev@jakarta.apache.org
        ReportedBy: bolandb@attbi.com


The reason and purpose of this is for performance situations as stated by 
Nikolaj.Brinch.Joergensen@sdk.sas.com

Following the recent thread discussion...

http://www.mail-archive.com/velocity-user@jakarta.apache.org/msg07051.html
http://www.mail-archive.com/velocity-user@jakarta.apache.org/msg07066.html


<snip>
BUT...this shows where an enhancement would be nice to have. If the
statement in the mergeTemplate() method of:
 
            template.merge( context, vw);

was replaced with:

                performMerge( template, context, vm );

where performMerge was a protected method of VelocityServlet with the
original statement as its default behavior, then you could easily
override this method in a subclass of VelocityServlet to place the
writer into the context. The VelocityServlet could still manage the
private writerPool.
<\snip>


An alternative solution would be to allow the writerPool, encoding and other 
private methods be protected so that it would be easier to override the 
mergerTemplate method so this could be implemented by the developer. Maybe both 
should be done. :)

bill

--
To unsubscribe, e-mail:   <mailto:velocity-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-dev-help@jakarta.apache.org>


Mime
View raw message