Re: Tools and Sessions

Nathan Bubna <[email protected]>
Newsgroups gmane.comp.jakarta.velocity.user
Message-ID <CAFyaDjHktEoeEkh+Q-gqVaEzkKSm=Aug4=WrhNNOgn6fnJQ1DQ@mail.gmail.com>
It's because by default it avoids session creation, passing in the
result of request.getSession(false).

You can configure your session toolbox to pass true and create
sessions.  See the examples at:
http://velocity.apache.org/tools/devel/config.html

(which i just noticed are all misformated. argh.)

On Sun, Apr 14, 2013 at 2:09 AM, Andrew Ducker <[email protected]> wrote:
> Odd one, that I'm hoping someone can clear up for me.
>
> I created a tool, and added setters for:
> public void setRequest(HttpServletRequest request)
> and
> public void setSession(HttpSession session)
>
> The session is being passed in as "null", but request.getSession() is
> returning the session I'd expect to get.
>
> Any idea why this would be?
>
> (Running under Google App Engine, which doesn't seem to cause a problem
> otherwise.  But you never know...)
>
> Andy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.