Thanks Eric,

Worked like a champ.  I'm realizing now that I'll need to be using the
User objects more than I thought.  The temp storage is the best way to
solve a lot of problems.

Thanks,
Rex

-----Original Message-----
From: Eric Emminger [mailto:eric@;ericemminger.com] 
Sent: Thursday, October 31, 2002 11:23 AM
To: Turbine Users List
Subject: Re: Reading a cookie from a session pull tool

Rex

> Is there any way to read and write to a cookie in a session pull tool?
If
> not, is there a workaround I can use?  

I think you have two options.
1) use Turbine; I'll explain
2) use JavaScript; you figure it out

If you want to use Turbine to read and write cookies, you have to be
able to access RunData so that Turbine can modify the HTTP response. You
could also use a request-scope pull tool that would put the RunData into
the User temp storage. Something like

User.setTemp("runData", RunData);

in the init() method of the request tool.

Then, you could User.getTemp() in the session tool to access the
RunData. You can then use the CookieParser as below.

String userId = ((DefaultTurbineRunData)
runData).getCookieParser().get("userId");

> I am trying to put a user id into the cookie that I can get to when
the user
> comes back to the site.  I'm trying not to use the Turbine User
classes
> because I'm not using Torque and plus I have a lot of my own legacy
user
> code already.

I guess this would be a work-around, but you'd only be using the Turbine
User classes to feed data to your legacy code.

Hope that helps. Let me know.

Eric

-- 
Eric Emminger
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:
<mailto:turbine-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:turbine-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:turbine-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-user-help@;jakarta.apache.org>

Reply via email to