Here is some crappy code that lets you pass a CF session around, sorta,
by using the cftoken, cfid, and application name.
<cfset tracker = createObject("java", "coldfusion.runtime.SessionTracker
")>
<cfset sessions = tracker.getSessionCollection(appName)>
<cftry>
<cfset thisSesh = sessions["#appName#_#acfid#_#acftoken#"]>
<cfset thisGrid = thisSesh["livegrid_#livegridname#"]>
<cfloop list="#structKeyList(thisGrid)#" index="sv">
<cfset arguments[sv] = thisGrid[sv]>
</cfloop>
The above example is a snippet from my livegrid experiment. Thus the
grabbing of the passed session's ["livegrid_##"] var.
I ran into this problem because I'm a bad coder, as in I couldn't figure
out how to have a cfc that isn't part of any particular application have
access to the calling page's application and session vars. Some of
the stuff spans requests, so I couldn't just slap them in the request
scope. Eh. If it's any clearer, I'd still like to know what best practice
would be for this scenario, but I fear that it's going to be "write better
code". =-]
As for the actual question, you don't need a session to pass form
vars around. Or you shouldn't, AFAIC. I assume you could always
include the cfid and cftoken in the URL, and that should preserve
the session, depending on the setup, but that might be what you
mean by url.sessionID, I'm not sure.
Sorry no real solution to your problem, but I'm still a little fuzzy
as to what the scenario is, funny as that sounds.
This little snippit has power though. Thanks Snake! :-)
:deN
On 5/17/06, Mark Leder <[EMAIL PROTECTED]> wrote:
>
> The java applet logic passes back form params. The form method is already
> set to post. The form params are vanishing after the file is uploaded to
> CF's temp directory. What I want to know is how does one make java applet
> form vars get passed back to the correct session (using the URL.sessionID
> that is passed in the string).
>
>
> Thanks,
> Mark
>
> -----Original Message-----
> From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 17, 2006 11:36 AM
> To: CF-Talk
> Subject: RE: Passing Java Applet vars back to CF
>
> Mark,
>
> >Using CFMX7 on Win2003. I have a java applet embedded in a CF page
> >(page1.cfm) (using object/embed tags) which performs a file upload.
> >Upon successful upload (no errors thrown), I redirect to a second CF
> >page
> >(page2.cfm) to perform additional routines on the FORM vars which
> >should be passed. However, no vars are being passed (the cfdump shows
> >nothing). I suspect that the session is being dropped, so that the
> >java applet doesn't know where to return the form vars to. In the java
> >applet I can set the form action =
> >"page2.cfm?sesID=#SESSION.sessionID#". However, on page2.cfm, how do I
> >retrieve the correct sessionID, so I can get at the form vars?
>
> The sesID variable would be in the URL scope--not the FORM scope. Also,
> makes sure that you've specified method="POST" on you <form /> tag. If
> not,
> it'll default to a GET operation, which means the variables will be in the
> URL scope, not the FORM scope.
>
> -Dan
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240858
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54