S.servletRequest is empty

12 views
Skip to first unread message

Joachim A.

unread,
Jan 31, 2009, 12:21:45 PM1/31/09
to lif...@googlegroups.com
Hi,
I was using S.hostAndPath and was surprised that it didn't include the
protocoll and path.
I've found out that S.servletRequest returns Empty here.

The method is called by in an actor.
Is some special initialisation necessary for this setup?

Thanks,
Joachim

David Pollak

unread,
Jan 31, 2009, 12:32:18 PM1/31/09
to lif...@googlegroups.com
The Actor code is outside of the HTTP request/response cycle, so there's no way to access the request information from the Actor.
 


Thanks,
Joachim





--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

Joachim A.

unread,
Jan 31, 2009, 1:13:51 PM1/31/09
to lif...@googlegroups.com

> > The method is called by in an actor.
> > Is some special initialisation necessary for this setup?
>
> The Actor code is outside of the HTTP request/response cycle, so there's no
> way to access the request information from the Actor.

Correct. Next time I'll think a little bit longer :)
I'll find another solution, either by configuration setting or by asking my
user's comet actor (still need to check if that works).

Thanks,
Joachim

David Pollak

unread,
Jan 31, 2009, 1:25:15 PM1/31/09
to lif...@googlegroups.com
On Sat, Jan 31, 2009 at 10:13 AM, Joachim A. <wallab...@googlemail.com> wrote:


> > The method is called by in an actor.
> > Is some special initialisation necessary for this setup?
>
> The Actor code is outside of the HTTP request/response cycle, so there's no
> way to access the request information from the Actor.

Correct. Next time I'll think a little bit longer :)
I'll find another solution, either by configuration setting

I'd stuff the information in a SessionVar so it'll be accessible to the CometActor.
 
or by asking my
user's comet actor (still need to check if that works).

The CometActor does not have access to the HTTP information, but it does have access to other state in S. 


Thanks,
Joachim


Reply all
Reply to author
Forward
0 new messages