velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adriana Danes <ADRIANA.DA...@EVIDIAN.COM>
Subject Re: Using Contexts within VelocityServlets
Date Thu, 28 Mar 2002 08:47:44 GMT


"Geir Magnusson Jr." wrote:

> On 3/27/02 10:59 AM, "Normand Gagnon" <ngagnon@newtradetech.com> wrote:
>
> > Do you need to have the Velocity Context in session? You can also use the
> > request to exchange object between servlets, like:
> >
> > request.setAttribute("ctx1",context1);
> >
> > context1=(VelocityContext)request.getAttribute("ctx1");
>
> That was my take too... Why use session?  Seems like a request thing...
>

The informations put in ctx1 are common to all subsequent requests.
Puting ctx1 in the session once (at the first request) saves a lot of
    request.setAttribute(...)


Mime
View raw message