velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <nbu...@gmail.com>
Subject Re: [VelocityTools 2.0 Alpha]
Date Tue, 13 Nov 2007 16:55:28 GMT
doRequest() isn't going anywhere.  it's not really designed to be an
extension point though, as it encompasses the whole workflow for a VVS
request (from initializing the context all the way through calling
requestCleanup and catching any errors along the way.  so, i would not
recommend overriding it.  better to put your extension work in the
middle of the workflow, if that works for you.

On Nov 13, 2007 5:23 AM, Erron Austin <erron.austin@gmail.com> wrote:
> I'm pretty sure I can use your suggestions to accomplish what I need. From
> your suggestions, though, I suppose that overriding doRequest is a bad
> idea?  Will overriding doRequest cause issues with future releases?
>
> Thanks,
>
>
> Erron
>
>
> On Nov 9, 2007 12:57 PM, Nathan Bubna <nbubna@gmail.com> wrote:
>
> > Oh yeah.  Well, my original plan was to deprecate handleRequest() in a
> > VelocityTools 1.4 release (which looks unlikely to happen), so that i
> > could remove it in VelocityTools 2.0 release.   However, since i'm
> > trying to make the transition between 1.3 and 2.0 smooth, i'll replace
> > the handleRequest() method in 2.0.  It will, however, still be
> > deprecated.
> >
> > As to what you should do in replacement, well, it depends on what you
> > are trying to accomplish in overriding that method.  If you are just
> > populating the context based on the request, then you should override
> > the fillContext(context, request) method.  If you need access to the
> > response and request both, then you should override
> > createContext(request, response) and call super.createContext(request,
> > response) right away to get access to the context.   If, however, you
> > are altering how templates are retrieved, then you should override the
> > appropriate getTemplate(...) method.
> >
> > If none of those satisfy, then let me know what you're trying to do,
> > and i'll help guide as i can.
> >
> > On Nov 9, 2007 9:35 AM, Erron Austin <erron.austin@gmail.com> wrote:
> > > This may have been documented somewhere and I'm just missing it.  But I
> > was
> > > using Velocity as a Web Framework. To that I was extending
> > > VelocityViewServlet, and overriding handleRequest(request,response,
> > > context). This method does not appear exist any more.  Is there a sample
> > or
> > > instructions or ideas of how to achieve the same functionality with the
> > > VelocityTools 2.0?
> > >
> > > Thanks,
> > >
> > > Erron
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> > For additional commands, e-mail: user-help@velocity.apache.org
> >
> >
>

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


Mime
View raw message