You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Will Glass-Husain (JIRA)" <ji...@apache.org> on 2005/09/19 08:03:58 UTC

[jira] Updated: (VELOCITY-79) Add the VelocityWriter to the context of the VelocityViewServlet

     [ http://issues.apache.org/jira/browse/VELOCITY-79?page=all ]

Will Glass-Husain updated VELOCITY-79:
--------------------------------------

    Bugzilla Id:   (was: 9139)
      Component: Tools
                     (was: Source)
    Description: 
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

  was:
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

    Environment: 
Operating System: All
Platform: All

  was:
Operating System: All
Platform: All

      Assign To:     (was: Velocity-Dev List)

> Add the VelocityWriter to the context of the VelocityViewServlet
> ----------------------------------------------------------------
>
>          Key: VELOCITY-79
>          URL: http://issues.apache.org/jira/browse/VELOCITY-79
>      Project: Velocity
>         Type: Improvement
>   Components: Tools
>     Versions: 1.3-rc1
>  Environment: Operating System: All
> Platform: All
>     Reporter: Bill Boland
>     Priority: Minor

>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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