Skip to main content
Participant
September 12, 2008
Question

CFM Code Help

  • September 12, 2008
  • 3 replies
  • 352 views
Can someone please take a look at this code and let me know what is wrong with it. Is it the CFSET statement amd I not using it correctly? Any advice would be greatly appreciated, I am new to ColdFusion so I am hitting a few bumps on the road.

<cfif isDefined("ses.value")>
<cfset padval = #toString(toBinary(ses.value))#>
<cfset did = Mid(padval, 13, Len(padval)-12)>
<cfoutput>
<cfset rl = "https://myapp.com/login.do?url=me&id=128962&usr=#did#&pwd=xxx">
</cfoutput>
<cfoutput>
<cfhttp method="Get" url="#rl#" redirect="yes"></cfhttp>
</cfoutput>
<cfoutput>
#cfhttp.filecontent#
</cfoutput>
<cfelse>
Get out of here!!!
</cfif>
    This topic has been closed for replies.

    3 replies

    Inspiring
    September 12, 2008
    > but there is also a jsessionid being passed which seems to
    > be what is screwing everything up

    In terms of syntax the cfset looks fine. What you are describing sounds like a logic problem. ie your string functions are not extracting the right substring. Can you give an example of the #ses.value#, and what you are trying to extract?

    That said, you do have some extra # signs and <cfoutput> tags, that are not needed. They will not prevent your code from working. But they are not needed. The only ones you need are here:

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



    estacosaAuthor
    Participant
    September 12, 2008
    Hi there,
    the code is suppose to be passing an encrypted id to the url in he cfset tag, but there is also a jsessionid being passed which seems to be what is screwing everything up, but I can't figure out what part of my code is making it go haywire. Am I using the cfset tag correctly in this code?
    Inspiring
    September 12, 2008
    estacosa wrote:
    > Can someone please take a look at this code and let me know what is wrong with it.

    What is the code actually doing and what should it be doing?