WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: getting session id

Re: getting session id

by Nathan Bubna :: Rate this Message:

| View in Thread

The VelocityViewServlet does.  Velocity itself is merely a template
engine and knows nothing about J2EE, nor should it.

On Wed, Apr 18, 2012 at 12:04 PM, Michael Remijan <MRemijan@...> wrote:

> It doesn't put the session in automatically??  the same with the request?
>
>>>> Nathan Bubna <nbubna@...> 4/18/2012 2:02 PM >>>
>
> If you put the HttpSession into the Velocity context, then you can use it.
>
> The VelocityViewServlet (part of the VelocityTools project) does that
> for you automatically.  Thus the references to $session being
> "magically" available.
>
> On Wed, Apr 18, 2012 at 11:46 AM, Michael Remijan <MRemijan@...> wrote:
>>
>> I want to be get the user's session id in my VM page.
>>
>> How do I do that?
>>
>> I have found references to $request.getSession() but this does not work.
>> $request and $session are not bound so I can't figure out how I can get
>> the
>> session id.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@...
>> For additional commands, e-mail: user-help@...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...

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

 « Return to Thread: getting session id