[hunchentoot-devel] Newbie question - how to examine session object?

Yarek Kowalik yarek.kowalik at gmail.com
Mon May 5 19:13:29 UTC 2008


Hi Zach,

Thanks for your help!!!

For the second argument I'm using what SLIME gives me for object
representation (copied object using middle mouse button).  If I want
to use the REPL object representation, what would  I need to do?

For the command you recommended, I get this:

----
CL-USER>
 (hunchentoot:session-value :remote-addr (first
                            (weblocks:active-sessions)))
NIL
NIL
----

Is that OK?  I'm getting the same values from both the local host and
a remote Windows box --  I was expecting two different IP addresses
for each of the sessions I have now (first and second in the active
session list).

Yarek



On Mon, May 5, 2008 at 12:03 PM, Zach Beane <xach at xach.com> wrote:
>
> On Mon, May 05, 2008 at 11:58:50AM -0700, Yarek Kowalik wrote:
>  >  I'm a lisp newbie, but I am very determined to quickly learn it.
>  >
>  >  I'm using most recent SBCL with Weblocks.  I'm connecting to my SBCL
>  >  using slime.  I'm intrested in examining the ession objects - what's
>  >  the most effective way of examining the session object?
>  >
>  >  Here is what I have tried, but obviously I am doing something wrong:
>  >
>  >  -------------------
>  >  CL-USER> (weblocks:active-sessions)
>  >  (#<HUNCHENTOOT::SESSION {100245E011}>)
>  >  CL-USER> (hunchentoot:session-value :remote-addr
>  >  (#<HUNCHENTOOT::SESSION {100245E011}>) )
>  >  ; in: LAMBDA NIL
>  >  ;     (#<HUNCHENTOOT::SESSION {100245E011}>)
>  >  ;
>  >  ; caught ERROR:
>  >  ;   illegal function call
>  >  ;
>  >  ; compilation unit finished
>  >  ;   caught 1 ERROR condition
>  >  -------------------
>  >
>  >  ... at which point I get into the debugger... What am I doing wrong?
>
>  Using too many parentheses for the second argument, and using
>  unreadable object syntax.
>
>  Here's something that might work instead:
>
>   (hunchentoot:session-value :remote-addr (first
>                              (weblocks:active-sessions)))
>
>  Zach
>  _______________________________________________
>  tbnl-devel site list
>  tbnl-devel at common-lisp.net
>  http://common-lisp.net/mailman/listinfo/tbnl-devel
>



More information about the Tbnl-devel mailing list