Personally, i'd drop the lambda, and do:
S.containerRequest.map(_.remoteAddress).openOr("localhost")
the map returns a Box[String], so we can get access and provide a
handy default if need be. If you dont want that, just do a pattern
match or whatever you want.
Cheers, Tim
On Dec 20, 2:38 am, Jarod Liu <[email protected]> wrote:
> S.containerRequest.map(r=>println(r.remoteAddress))
>
> On Dec 20, 4:18 am, "Neil.Lv" <[email protected]> wrote:
>
>
>
> > Hi all,
>
> > I want to get the IP address of the users.
>
> > How can i get the remote IP address in the lift?
>
> > Thanks for any suggestion!
>
> > Cheers,
> > Neil
--
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en.