Session Var

ok, I set a session var to about 2K of text
I have an iframe which is part of a menu navigation system.
The content of that iframe is slow to get from the DB so I
cache the HTML for it into a session var.
If a user clicks a link, the iframe submits to itself, does
a few things, and then cflocation's out to the chosen page.
The next time this iframe is loaded( almost immediately) it
reads the session var and it is EMPTY!
I'm not overwriting it, not structDelete'ing it, Any time I
set it outside of this page, it's done with a check to see
if it isDefined first, and if so, does nothing.
Are there known issues with CFParam? large text session vars?
WTF?
D.

dnagel wrote:
> ok, I set a session var to about 2K of text
>
> I have an iframe which is part of a menu navigation
system.
> The content of that iframe is slow to get from the DB so
I
> cache the HTML for it into a session var.
>
> If a user clicks a link, the iframe submits to itself,
does
> a few things, and then cflocation's out to the chosen
page.
>
> The next time this iframe is loaded( almost immediately)
it
> reads the session var and it is EMPTY!
>
> I'm not overwriting it, not structDelete'ing it, Any
time I
> set it outside of this page, it's done with a check to
see
> if it isDefined first, and if so, does nothing.
>
> Are there known issues with CFParam? large text session
vars?
>
> WTF?
>
>
> D.
So, I pulled out Fiddler, and lo and behold I was
making a call to my page with no params at one part
of the load and then later on, calling it again
properly with the correct params. I'm checking
for an empty URL param set now and all is well...
Thanks for your time on this folks!
D.

Similar Messages

  • Set session var using js

    Hi all, I have small js that is being called when a radio button is clicked. I need that to set a cf session var which will have the radio value so that when the page refresh it will remember what is selected...
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <cfif cgi.PATH_TRANSLATED CONTAINS 'index.cfm'>
      <cfoutput>
       <META HTTP-EQUIV="refresh" content="60;URL=http://#HTTP_HOST#/NEA/index.cfm?location=ALL">
      </cfoutput>
    </cfif>
             <script type="text/javascript">
             function select_location(select_me){
              window.location ="index.cfm?location=" + select_me.value;
             </script>
             <input  <cfif url.location eq "NM">checked="checked"</cfif> type="radio" name="location" id="NM" value="NM" onClick="select_location(this);"><label for="NM">NM</label> 
             <input  <cfif url.location eq "SM">checked="checked"</cfif> type="radio" name="location" id="SM" value="SM" onClick="select_location(this);"><label for="SM">SM</label> 
             <input <cfif url.location eq "BQ">checked="checked"</cfif> type="radio" name="location" id="BQ" value="BQ" onClick="select_location(this);"><label for="BQ">BQ</label> 
             <input <cfif url.location eq "MV">checked="checked"</cfif> type="radio" name="location" id="MV" value="MV" onClick="select_location(this);"><label for="MV">MV</label> 
             <input <cfif url.location eq "SI">checked="checked"</cfif> type="radio" name="location" id="SI" value="SI" onClick="select_location(this);"><label for="SI">SI</label> 
             <input <cfif url.location eq "BR">checked="checked"</cfif> type="radio" name="location" id="BR" value="BR" onClick="select_location(this);"><label for="BR">BR</label> 
             <input <cfif url.location eq "HV">checked="checked"</cfif>  type="radio" name="location" id="HV" value="HV" onClick="select_location(this);"><label for="HV">HV</label>
             <input <cfif url.location eq "ALL">checked="checked"</cfif> type="radio" name="location" id="ALL" value="ALL" onClick="select_location(this);"><label for="ALL">ALL</label><br>

    JavaScript runs on the Client.  ColdFusion runs on the server.  They do not talk to each other or share memory.
    The only way to get data from the client to the server is to make a request.  The only way to get data from the server to the client is to respond to a request.
    You can make that request by submitting a form either in the get or post scope.
    You can make that request by sumitting a request with the xmlHTTPrequest() function, commonly called AJAX.
    But somehow or the other you have to make a request.

  • Session Vars and Local Firewalls

    I've been getting more complaints lately that session vars
    are getting lost and normally I walk them through making sure
    cookies are enabled, but now that doesn't seem to be always the
    case anymore and have finally isolated it to when they install a
    firewall. If they disable it works, but when on it doesn't. Is
    there anything I can do besides telling them not to use their
    firewall?
    Server specs:
    ColdFusion MX 6.1 on a non-clustered environment.
    User:
    Using IE and using "e-trust EZ Armor"

    I assume then, you are storing variables in cookies, rather
    than registry or database then, correct?
    Are these local firewalls? (on the actual PC) or H/W on a
    network?
    If they are local, the firewall itself may be eliminating the
    cookie storage, not the browser ... if it is, it likely has a way
    to change the settings.
    There's not much you can do if you are forced to use cookies
    for sessions (which is very common) other than altering your coding
    or having the user change their settings.
    If you have access to the CF admin, you may try setting up a
    DB service for variable storage, which is an option.

  • Delete a session var(struct)

    Is there a way to delete a session var(struct) rather then
    just clear it?
    Thanks in advance!

    I'm hoping to struct completely. Is that possible?
    I am presuming that you meant to say something like "to
    destroy the
    struct completely". If so, just set the variable to something
    else.
    I.E.
    <cfset aStruct = structNew()>
    <cfset aStruct.aKey = "foobar">
    <cfdump var="#aStruct#">
    <cfset aStruct = ""><!--- Some sort of NULL would
    probably be nice here
    but CF does not do really NULLS --->
    <cfdump var="--->#aStruct#<---">

  • Passing session var

    I'm trying to assign session. var to domain names. E.G
    (mydomainname.com) and (somthingdiff.com)
    so if user went to mydomainname.com then went to
    somthingdiff.com this would contain the same session.var.

    I don't think you can do that. You are ending a session on
    mydominname.com and starting a new one on somthingdiff.com. Pass
    your variable in the URL.

  • Session vars, CFCs and CFHTTP

    Hi guys
    I'm using session vars to maintain whether or not a user is
    logged in on our site. The only problem is is that the session vars
    seem to be lost after I call a CFC that then does a CFHTTP post.
    Does anyone know how I maintain the session vars?
    I'm using CF MX 7
    All the best
    Wez

    wezcornell2008 wrote:
    > Hi guys
    >
    > I'm using session vars to maintain whether or not a user
    is logged in on our
    > site. The only problem is is that the session vars seem
    to be lost after I call
    > a CFC that then does a CFHTTP post.
    >
    > Does anyone know how I maintain the session vars?
    >
    > All the best
    >
    > Wez
    >
    Why do you say they are lost? Are you sure you did not just
    misplace them?
    In other words nothing about CFC's or CFHTTP would
    intrinsically destroy
    session variables in memory. But they could easily not have
    access to
    the scope as you desire if you do not understand how
    templates and cfml
    code are associated with a given session scope when it is
    running in memory.

  • Null value in Session vars and request.getParameter

    We're migrating our application from iPlanet.
              Under iPlanet, when we looped through a resultset and set the values to
              session variables - it worked fine, even when a resultset value was null,
              but in WebLogic, I get the following error:
              java.lang.IllegalArgumentException: key/value is null
              Is there anyway to "turn this off" so it behaves like iPlanet?
              My second question is that we have many JSP's that check to see if a
              parameter is null in javascript:
              Here's the code:
              function onLoad() {
              document.form.elements[0].focus();
              // Check to see if the user is coming from a shortcut
              var imageName = "<%=request.getParameter("imageName")%>";
              if (imageName == "null") {
              selectTop("<%=select_image%>");
              } else {
              selectTop(imageName);
              <% if (tableIndex == 2) { %>
              loadShortcutIcon(13,100);
              <% } %>
              in iPlanet, when the parameter "imageName" is not in the URL, the javascript
              variable gets set to "null" - but in WebLogic, it is set to a blank string -
              "". Is there anyway to make this return null like iPlanet?
              Thanks,
              Matt
              

    Hi,
    the URL parameter is added just for the request to the page. When you press the command button then you issue a new request that does not have a URL parameter added. To work around this, you can use a PhaseListener that stores the URL request parameter in the session for later use
    Frank

  • Session Var set onSessionStart is Undefined

    Hello,
    I am having an issue with a session variable becoming undefined. The var is set (cfparam) on the Application.cfc page in the onSessionStart function. How is it possible for the variable to be undefined if it is set when the session starts? If the session has expired, wouldn't the onSessionStart function run, thus creating the var again? I have this problem on a couple of different applications and I am not sure why it is happing. Any ideas?
    CF9
    Thanks,
    Josh

    JavaScript runs on the Client.  ColdFusion runs on the server.  They do not talk to each other or share memory.
    The only way to get data from the client to the server is to make a request.  The only way to get data from the server to the client is to respond to a request.
    You can make that request by submitting a form either in the get or post scope.
    You can make that request by sumitting a request with the xmlHTTPrequest() function, commonly called AJAX.
    But somehow or the other you have to make a request.

  • Session Vars on Develop Server

    I think this is a server issue and hope someone can clear
    this out for me:
    If I run the following code on our production server I get 4
    session variables: "sessionid", "urltoken", "sesVarOne" &
    "sesVarTwo".
    Runnig this code on my develop server (my notebook) I only
    get the "sesVarTwo" variable.
    go.cfm
    <cfset session.sesVarOne = "yes">
    <cfdump var="#session#">
    <cflocation url="goto.cfm">
    goto.cfm
    <cfset session.sesVarTwo = "yes">
    <cfdump var="#session#">

    pope on acid wrote:
    > Thx,
    > With your reply and the 'CF Help' I found the best
    solution (for me):
    > Using a application.cfm template with the following tag:
    >
    >
    >
    > <cfapplication name="INTRANET"
    > clientmanagement="yes"
    > sessionmanagement="yes"
    > setclientcookies="yes"
    > setdomaincookies="yes"
    > sessiontimeout="#CreateTimeSpan(0, 1, 0, 0)#"
    > applicationtimeout="#CreateTimeSpan(0, 4, 0, 0)#"
    > clientstorage="Registry">
    >
    Just know, if you did not get there yet. That
    clientstorage="Registry"
    is about the worst place to do this. Many problems associated
    with
    ColdFusion can be caused by this setting and it's tendency to
    eventually
    fill up the registry with data.
    Unfortunately it is the most universal option. Thus, as a
    default, it
    works well in that it will work for more people out of the
    box then any
    other option.
    If you are not going to use client variable, just turn them
    off. If you
    intend to use them, it is highly recommended you use some
    other option
    rather then 'registry'.

  • Known Issues with Session Vars and non-IE browsers?

    Are there any known issues with non-Internet Explorer
    browsers storing or reading session variables. Or loops and
    ListGetAt functions? I'm using CF 5.
    The code works fine in IE, but not in FireFox or Netscape.
    Thanks,
    Josh

    This testing will not really address any cross domain issues, due to the content being hosted by ScormCloud.
    What I found interesting, is that in ScormCloud, using the links below, my results were opposite those that I obtained through my LMS.
    In LMS, Captivate 5 worked, Captivate 6 did not in IE8, both worked in FF
    In ScormCloud, Captivate 5 did not work in IE8, but worked in FF, and Captivate 6 did work in FF and IE8.
    Here are the links:
    captivate 5 http://cloud.scorm.com/sc/InvitationConfirmEmail?publicInvitationId=3c04f298-d0db-4d10-ab6 3-80b9aaf2890b
    captivate 6 http://cloud.scorm.com/sc/InvitationConfirmEmail?publicInvitationId=e2b05753-2f03-421a-87d 9-62b92ad199af
    Thanks for your attention, every bit of information that I can get will help.
    Thanks,
    SL

  • Session var question

    never mind...got it
    Edited by: mbowles on Aug 27, 2009 6:03 AM

    To answer your question no. For security reasons, you cannot retrieve a sessoin using its ID.
    Is it an extremely secure piece of information?
    If the servlet and applet are talking to the same web application, you could possibly pass the data via the application scope (have a map in application scope, keyed by the session ID, and put the value to pass in that)
    Its not completely secure, because any servlet/jsp in the application can view that data, but it is a sidestep hack to accomplish what you wish :-)

  • Problem getting session vars to stay defined

    I am frustrated please help. I have used earlier versions of
    CF but cf 8 is very new to me. I want to set session variables with
    in the application.cfc, I thought I had it correct for session
    management to be initiated, as session variables can be defined.
    However using them with SSL... well - when a user accesses a page
    that is under the secure socket layer the variables are undefined.
    I dont understand what is occuring. This is what I have in my
    application.cfc file to start session management:
    <cfcomponent output="false" hint="Handles application
    level events.">
    <!--- Set up the application. --->
    <cfset THIS.Name = "AppCFC" />
    <cfset THIS.ApplicationTimeout = CreateTimeSpan( 0, 0, 60,
    0 ) />
    <cfset THIS.SessionManagement = true />
    <cfset THIS.SetClientCookies = false />
    <CFSET request.dsn = "wlaw" />
    </cfcomponent>
    ALL HELP IS APPRECIATED
    Thank you in advance!
    Mike Dooly

    problem fixed!
    Thank you for your input, I discovered this morning that it
    was in my
    application.cfc file that I had made the error... too weird
    cause CF never complained, it just did not provide me with session
    scope...
    I am once again smiling, dont ask me why but it feels
    good.........
    mdooly

  • Internet Explorer and CF session vars

    I am using CF 7 and I noticed that Internet Explorer 6 does
    not see
    any of my session variables. FireFox has no problem. This
    happens
    locally and on the web site.
    Can anyone shed some light on this for me?
    Thanks.

    To be a pedant for a moment IE won't see any of your session
    variables, neither will Firefox, they are only availble server
    side.
    However, it is probably more likely to do with the security
    settings in IE; more specifically the way it allows cookies to be
    set.
    If cookies are disabled it will appear to the server that the
    next page request has come from some one new.

  • PLSQL access to OAE session vars?

    Hi folks,
    Is it possible to access session values from within a body of PL/SQL called by OAE? That is, I'd like to access some session variables (including App Number, btw) in my PL/SQL code...
    I saw a reference to
    htmldb_application.fetch_app_item(p_item=>'ITEM_NAME',p_app=>200);
    in an earlier post, but since appNumber is actually one of the things I don't want to hard-code in my PL/SQL that's a little defeating...
    Thanks,
    Jim C.

    Dumb, dumb, dumb... When am I going to learn?
    Read first --> then Post.
    Oy. Chapter 13, User's Guide. HTMLDB_UTIL.GET_SESSION_STATE() (or V() ) seems to do it.
    Thanks for putting them in there, guys!

  • Application vars are Independent from Session vars?

    This excerpt from the manual, "ColdFusion MX applications and
    sessions are independent of each other. For example, if an
    application times out while a user’s session is active,
    the session continues and the session context,
    including the user’s Session scope variables, is
    unaffected by the application ending and restarting."
    OK, how can an application timeout while a session can
    continue. I can think of ways in which this could happen (if the
    application timeout is very short), but for all practical purposes
    it really doesn't make any sense. The fact that a user is active in
    the application would, in effect, extend the application
    time.

    This livedoc may shed a little more light on the subject:
    http://livedocs.adobe.com/coldfusion/7/htmldocs/00001156.htm
    For example, #Application.datasource# could timeout but
    #Session.username# could still be active.

Maybe you are looking for

  • What size hard drive will fit into a 2010 Mac mini?

    Hello all, I am planning to buy a new Mac mini. However I intend to upgrade the hard drive, i.e. buy a 320GB Mac Mini then remove the hard drive and replace it with a better one. I have my eyes on two Western Digital hard drives: + WD Scorpio Black 7

  • Vendorwise Rejection Report

    hi all,   My client want to see rejection report vendor wise so that next time order placed to vendor with least rejection.   Is this report is present in SAP. thanks rahul

  • How public is mobileme gallery?

    Yesterday in trying to move a photo from iPhoto to iWeb, I agreed to have my photos in my gallery. I suddently realized afterwards that I had probably put photos of school children in the gallery. I do not have permission to do this. I can only publi

  • What is the best way to write management pack modules?

    i have written many modules using powershell script but when i deploy that management pack on SCOM it is throwing so many errors saying powershell script has dropped due to timeout. My Mp has lot of powershell script which gets the data from the serv

  • Green Screen with Hardware Acceleration Disabled

    I am having the EXACT same problem. The screen on Youtube for example goes screen and then fastforwards automatically (while still being screen). Sometimes (very often) the playback from a video restarts - randomly, without me doing anything. Don't k