here is some code that works - I got rid of the stuff that I used to figure 
out what cookies I needed to create and send, but this might get you 
started. Hopefully I understood the question.

<cfif not isdefined('session.othersite')>
   <cfset session.othersite = StructNew()>

   <cfhttp
   url="http://www.othersite.com/index.cfm";
   method="POST">
      <cfhttpparam type="FORMFIELD" name="fuseaction" value="logonprocess">
      <cfhttpparam type="FORMFIELD" name="manager_SERIAL" value="password">
   </cfhttp>
   <strong>Response Headers</strong><br>
<CFLOOP collection=#CFHTTP.RESPONSEHEADER# item="httpHeader">
    <CFSET value = CFHTTP.RESPONSEHEADER[httpHeader]>
    <CFIF not IsSimpleValue(value)>
        <CFLOOP index="counter" from=1 to=#ArrayLen(value)#>
            <cfif httpheader is "SET-COOKIE">
                           <CFOUTPUT>
                <Cfset cookie=ListFirst(value[counter],";")>
                                <cfset "session.othersite.#ListGetAt(cookie, 1 
,"=")#"=ListGetAt(cookie, 
2 ,"=")>
               </CFOUTPUT>
                        </cfif>
        </CFLOOP>
    </CFIF>
</CFLOOP>
<!---
<cfoutput>
   <pre>
   BrowserKey: #session.othersite.browserkey#<br>
   CFID:       #session.othersite.CFID#<br>
   CFTOKEN:    #session.othersite.CFTOKEN#<br>
   PASSWORD:   #session.othersite.PASSWORD#<br>
   SESSION_UUID: #session.othersite.SESSION_UUID#<br>
   </pre>
</cfoutput>
--->
</cfif>

<hr>
<cfhttp
   url="http://www.othersite.com/content.cfm";
   method="POST"
   resolveurl="true">
   <cfhttpparam type="COOKIE" name="BrowserKey" 
value="#session.othersite.browserkey#">
   <cfhttpparam type="COOKIE" name="CFID" value="#session.othersite.CFID#">
   <cfhttpparam type="COOKIE" name="CFTOKEN" 
value="#session.othersite.CFTOKEN#">
   <cfhttpparam type="COOKIE" name="PASSWORD" 
value="#session.othersite.PASSWORD#">
   <cfhttpparam type="COOKIE" name="SESSION_UUID" 
value="#session.othersite.SESSION_UUID#">
</cfhttp>

<cfoutput>
#cfhttp.filecontent#<br>
</cfoutput>


From: Nathan Shaw <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: CF-Talk <[EMAIL PROTECTED]>
Subject: SOT: servlet maintain state in CF app
Date: Tue, 19 Nov 2002 10:16:30 -0800 (PST)

Hi all. I am a digester (can't handle the traffic), so
I
would appreciate a direct reply to [EMAIL PROTECTED]
Thanks =;>

I am writing a servlet to act as a gateway to a CF app
in a portal. I am making HTTPURLConnections to the CF
app ok, but I cannot seem to get it to maintain state,
even though I am grabbing the CFID and CFTOKEN from
the headers I get back and sending them along with my
requests. I have tried sending them thru a GET, POST
and as cookies and the CF app keeps sending me back a
new CFID and CFTOKEN on each request, thus losing
state.

Has anyone had any experience in doing something like
this? What is the trick to get CF to "see" the CFID
and CFTOKEN I am sending it?

Thanks,

--Nathan

__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to