Purchased ColdFusion 10: Having problem with session variables

My Dept. has just bought CF10 and I'm finally updating my existing web app to CF10 from CF8. My First Problem with CF10 is using session variables.
When using the lower version of CF (since CF 4 to 8) I have never had any problem setting up session variables and getting or using these variables in other pages after a successful login but with CF 10 it seems setting session variables and using them in other pages are a major problems. I'm not sure where have I done wrong in the codes.
First I'm setting the session in my Application.cfc This way:
<cfcomponent displayname="Application" output="true">
  <cfset THIS.Name ="MyNewApp"/>
  <cfset THIS.ApplicationTimeout = CreateTimeSpan(0,0,20,0) />
  <cfset THIS.SessionManagement ="YES"/>
  <cfset THIS.SessionTimeout = CreateTimeSpan( 0, 0, 20, 0 ) />
  <cfset THIS.SetClientCookies = false />
<cffunction name="OnApplicationStart" access="public" returntype="boolean" output="false">
<cfset application.Main_DSN = "TESTDB">
<cfreturn true />
</cffunction>
<cffunction name="onApplicationEnd" output="false">
      <cfargument name="applicationScope" required="true">
    </cffunction>
<cffunction name="OnSessionStart" access="public" returntype="void" output="false" hint="Fires when user session initializes.">
<cfset session.loggedin = "NO">
<cfset session.username = "">
<cfset session.userrights = "">
<cfset session.usergroup = "">
</cffunction>
</cfcomponent>
After login, user is validated and set values to those session.variables:
........user validation codes here......................
<cfif mylogin NEQ true>
      <cflocation url="/login/login.cfm">
      <cfabort
<cfelse>
      <cfset session.loggedin="Yes">
      <cfset session.username="#Trim(Form.username)#">
     <CFSET qUserRights = LoginObj.getUserRights('#Trim(Form.username)#')>
     <cfset session.userrights = qUserRights><!--- it's a query --->
    <CFSET qUserGroup = LoginObj.getUserGroup('#Trim(Form.username)#')>
        <cfloop query="qUserGroup">
           <cfset session.usergroup = user_group>
           <cfbreak>
        </cfloop>
    <!--- ****************** ???????????????????????????????????????????????????????????????????????????
    When I do cfdump in at this level, I can see that all of these session variables have been assigned to their values.
    But these session variables are not accessible from other pages. Other pages still show these session variable without its value.
    So, when I use these cfdumps in the index.cfm it is shown as they're not yet assigned with any values   ****************** --->
   <cfdump var="#session.loggedin#">
   <cfdump var="#session.username#">
   <cfdump var="#session.userright#">
   <cfdump var="#session.usergroup#">
</cfif>
In index.cfm, Before Login I got:
session.loggedin = NO
session.username = ["empty string"]
session.userrights = ["empty string"]
session.usergroup = ["empty string"]
After a successful Login:
session.loggedin = NO
session.username = ["empty string"]
session.userrights = ["empty string"]
session.usergroup = ["empty string"]
Have I done something wrong? These codes work on CF8. Please help.
I need to mentioned:
CF10 is in Linux and my web app is under https not http. But these session variables should be shared bentween http and https because some older application are still in http.

On which page is the following code?
After login, user is validated and set values to those session.variables:
........user validation codes here......................
<cfif mylogin NEQ true>
      <cflocation url="/login/login.cfm">
      <cfabort
<cfelse>
      <cfset session.loggedin="Yes">
      <cfset session.username="#Trim(Form.username)#">
     <CFSET qUserRights = LoginObj.getUserRights('#Trim(Form.username)#')>
     <cfset session.userrights = qUserRights><!--- it's a query --->
    <CFSET qUserGroup = LoginObj.getUserGroup('#Trim(Form.username)#')>
        <cfloop query="qUserGroup">
           <cfset session.usergroup = user_group>
           <cfbreak>
        </cfloop>
    <!--- ****************** ???????????????????????????????????????????????????????????????????????????
    When I do cfdump in at this level, I can see that all of these session variables have been assigned to their values.
    But these session variables are not accessible from other pages. Other pages still show these session variable without its value.
    So, when I use these cfdumps in the index.cfm it is shown as they're not yet assigned with any values   ****************** --->
   <cfdump var="#session.loggedin#">
   <cfdump var="#session.username#">
   <cfdump var="#session.userright#">
   <cfdump var="#session.usergroup#">
</cfif>

Similar Messages

  • Problem with Session variable initialization block

    Hi,
    I'm getting strange results when using session variables in my repository files.
    I have created session variables as specified in the document which is available at
    http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/bi_admin/biadmin.html
    The main problem getting with the system session variable (USER) in the select statement.
    My select statement is as follows,
    select ':USER',case when upper(':USER') = 'KUMAR' then 'APR-05' end from Dual
    The problem is while logging into the BI Answers it is allowing all the invalid users to login who does not exist.
    when i remove the quotes and simply use :USER in the select statement it is not allowing the invalid users to login but giving error while displaying the results.
    when i remove the user variable from select statement its giving correct results.
    Can i know what is causing the problem.
    Thanks,
    Kumar.

    Hi DK,
    Check out my post Rowlevel Security?? and see if it helps you.
    Cheers!
    -Joe

  • Problem with session variable

    Hi,
    After I insert a record into my MS Access database, it seems
    to me that the session variable got destroyed so the next page
    display the session variable as undefined. Has anyone have similar
    problem? If so, how to work around that?
    Thanks.
    Tommy,

    neptunes wrote:
    but its leading to jsp page error...For starters: never, never, ignore errors (exceptions and stacktraces). Those contain very, very, worthful information about the cause of the problem and what exactly went wrong. This way you can easily trackback the problem and solve it.
    If you're unable to think logically and smart so that you can interpret the error yourself, if necessary with help of Google, then post it here. Then we'll tell you about the actual problem and possible soltions.
    At any way:
    iam displaying some data in a table using resultset object,now at the same time iam using to session variable to use the resultset object in my other applications...This already doesn't sound very good. You should never pass expensive resources around like that. You should acquire and close the Connection, (Prepared)Statement and ResultSet in the shortest possible scope. Preferably already in the same method as where you query the data.

  • Having problem with setting variable on a textfield

    I'm using createTextField to create a textfield. I have also created a input textfield with a variable called textline1 (I don't create the inputfield with as).
    I want to display the letters in the created textfiled that I'm typing in the input field. So this in my AS coed:
    _root.createTextField("text1",1,100,100,300,100);
    text1.variable = textline1;
    format1 = new TextFormat();
    format1.color = 0xff0000;
    format1.size = 50;
    format1.bullet = false;
    text1.setTextFormat(format1);
    but it doesn't work. So anyone see the problem?
    (sorry for bad english)

    i think you're going to have more problems if you continue using textfield variables.  you should not use them.  just use the text property of the textfield to reference its contents.
    but, if you want to continue, use:
    var tl:MovieClip=this;
    fontsize=20;
    myInputText_txt.onChanged = function(text1:TextField) {
    _root.myText_mc.createTextField("text_txt",1,100,100, 100,100);
    _root.myText_mc.text_txt.variable = tl["text2"];
    text2=text1.text;
    format1 = new TextFormat();
    format1.color = 0xff0000;
    format1.size = fontsize;
    format1.bullet = false;
    text_txt.setTextFormat(format1);
    p.s.  please mark this thread as answered.

  • Having problem with simple variable use in another class

    I have a variable made by input from my main class file called upperLimit. I have an external class file in which I would like to use the variable created by the input for upperLimit, but I have forgotten how to go about it. The objective of the program is to output all perfect numbers from 1-upperLimit.
    This is my main class:
    import java.util.Scanner;
    public class Lab13aab
    public static void main(String args[])
    System.out.print("In the range of [1-10000] what will the upper limit be for analysis? ===> ");
    Scanner input = new Scanner(System.in);
    int upperLimit = input.nextInt();
    System.out.println();
    checkToSee isItPerfect = new checkToSee();
    int numToCheck;
    for(numToCheck=1; numToCheck>=upperLimit; numToCheck++)
    isItPerfect.analyze();
    }and this is my external class which checks to see if an individual number is a perfect number or not:
    public class checkToSee
    public void analyze()
    int total=1;
    int factor;
    for(factor=2;factor<upperLimit;factor+…
    if(upperLimit%factor==0)
    total = total + factor;
    if(total==upperLimit)
    System.out.println(upperLimit + " is a perfect number!");
    System.out.println();
    }

    Hy Why ;-)!
    Let me guess... you're both new to Java AND Object Orientation? Because you're code (apart from the fact that it is not working) is purely procedural and has nothing to do with object orientation (at least most of it). Have you programmed in C/C++ before?
    See the [The Java Tutorial|http://java.sun.com/docs/books/tutorial/java/javaOO/index.html] for more infos...
    Greetz, Oliver
    Edited by: Trollhorn on Aug 29, 2009 11:02 AM

  • Problem with sessions in Kate Editor

    Hey guys!
    I'm using Kate Editor to code and i'm having problems with sessions. If kate is open and I logout KDE, when I come back to KDE all my customizations in Kate's session (activated plugins, font size, etc) are lost.
    If I manually close Kate before logout from KDE, all the customizations are kept when a manually start Kate. I tried a lot of workarounds, but none worked.
    Is this a bug? Someone else with this issue?
    Thanks in advance!

    The Warning errors are simply because you don't have the tablespaces, users, and roles defined in your application system under the DB Admin tab. Unless it is important to you to capture the physical implementation of your tables exactly as well as the table definitions, you can safely ignore these. If the physical implementation IS important to you, then you need to create these tablespaces, roles and users under the database that you created under the DB Admin tab before you start the capture.
    The Error is because in the set of objects you are capturing there is a foreign key that references the table named "PLEASANT". This table must be among the objects that you are capturing, or must already be in a Table Definition in your application system in the repository.

  • Problems with /tmp variable

    Hi,
    I'm writing a shell script and I seem to be having problems with a variable that is creates a directory in the /tmp directory. Essentially, there are several points where various parts of the script call out information that gets exported to that directory. My script is failing upon creation of this directory, is there any specific permissions on the /tmp directory in mac that would need to be set before something like this occurred?
    Thanks!

    My script is failing upon creation of this directory
    Maybe you could post your code, that way we can see how you're trying to create the directory and may be able to spot the problem. As it is we're working blind, and that's not easy.

  • I am still having problems with my music videos freezing (all purchased from iTunes) since the update.  Have restarted, rebooted etc. and it is worse than before.  Help!  Spent a lot of money on these and they won't play properly.

    I am still having problems with my music videos freezing (all purchased on iTunes) since the update.  The first day of the update, no problems...played 6 hours of music videos and no freezing.  Today...every single video froze!!! So frustrating!  I rebooted, restarted, powered down and no help.   I would appreciate any suggestions.  Thanks.

    I don't know how to do this without using a mouse point.
    This may help, http://www.computerhope.com/issues/ch000542.htm
    As for question #2, you call tell how iTunes is sorting songs by the up or down arrow next to a header name.
    Even the original order that the songs were entered or date added or last played can be sorted.
    Much easier with a mouse or touch pad.

  • I am having problem with my itunes account because when i try to buy something online it say..Your purchase can not be completed for assistance, contact itunes support.

    I am having problem with my itunes account because when i try to buy something online it say..Your purchase can not be completed for assistance, contact itunes support.

    What happened when you contacted iTunes support as directed?
    http://www.apple.com/support/itunes/contact/

  • Having problem with purchases. Message is saying my billing info is incorrect

    Having problem with purchases. Message is saying my billing info is incorrect

    Make sure your payment information on your iTunes account matches with your bank's. If it's correct and you still cannot purchase, you'll need to contact support and have them check your account.
    http://www.apple.com/support/itunes/contact/
    Cheers!

  • Just purchased Wndows Vista and having problems with the port for Palm 125

    I just purchased a Windows Vista computer and having problems with getting my Palm 125 to sync with the desktop.  I get an error message saying:  "Com1 not available"  What do I do?
    Thanks,
    Frustrated
    Post relates to: Palm m125
    This question was solved.
    View Solution.

    Sorry, that didn't work.  I get no drop down menu from the Hot Sync Manager for the Serial Port.  What comes up often is:  "The selected port, COM1, is not available at this time.  Hot Sync Manager will open the port when it becomes available." 
    Could it be the Norton Antivirus Firewall that is preventing the Hot Sync Manager to open the Serial Port?  Just a thought.  Thanks for your help.
    Post relates to: Palm m125

  • We recently purchased the iphone5 (2) and are having problems with sound coming thru the earbuds when we plug them in to the iphones.  works fine with the ipad.  help please

    recently purchased the iphone5 (2 of them) and are having problems with the earpods.  no sound when plugged in to the iphone.  both phones.  works with the ipad.  help please

    Hi P5052,
    Welcome to the Support Communities ... and congratulations on the purchase of your iPhone 5's!
    It is very unusual that neither phone is working with the new earpods. 
    Have you tried a different headphone just to see if the issue is with the earpods or the iPhones?
    The article below will give you the basic troubleshooting steps for this issue.
    Click on the link below to see more details and screenshots. 
    I've quoted some helpful highlights for you:
    iPhone: Can't hear through the receiver or speakers
    Symptoms
    When someone calls, I can't hear them through the receiver or speaker phone, and I can't hear music through the speaker. I also can't be heard by someone who is calling me.
    Note: iPhone has one speaker, which is adjacent to the dock connector. On iPhone 4 or later models, the speaker is to the right of the dock connector. On earlier iPhone models, the speaker is to the left of the dock connector.
    Resolution
    Verify that there is nothing plugged in to the headset jack, including headsets, headphones, or adapters.
    Make sure the Ring/Silent switch is not switched to silent.
    While on the Home screen, adjust the volume buttons. If you see the icon below, indicating that headphones are attached, there may be debris or an object lodged in the headset jack:
    Check the headset jack. If there is an object lodged in the headset jack that is not easily removed, have the iPhone serviced to remove object.
    For Original iPhone: If there is light debris, such as lint, in the headset jack, try connecting a pair of headphones to the headset jack and then remove the headphones. Repeat this several times to remove the debris.
    If you have installed a protective film on the display, either ensure that the receiver is not covered or remove the film completely.
    Check the receiver mesh (which is on the top front of the device, above the display). If it appears blocked, use a clean, small, dry, soft-bristled brush to carefully and gently brush away any debris.
    If you have paired with a Bluetooth headset that is nearby, either use the headset or turn Bluetooth off (chooseSettings > General > Bluetooth).
    Restart the iPhone.
    If restarting the iPhone doesn't resolve the issue, try restoring the device.
    If the issue persists, go to the Service Answer Center - iPhone for information on service.
    Hope this helps!
    - Judy
    <Edited by Host>

  • Having problem with purchase

    hi, i having problem with purchase

    What happened when you contacted iTunes support as directed?
    http://www.apple.com/support/itunes/contact/

  • I had already update mi new factory unlocked iPhone 4S to iOS 5.1.1 and I still having problems with "invalid sim". I'm from Argentina and here we don't have official service. PLEASE HELP ME, WHAT CAN I DO??? In Argentina is too expensive an iPhone 4S.

    I had already update mi new factory unlocked iPhone 4S to iOS 5.1.1 and I still having problems with "invalid sim". I'm from Argentina and here we don't have official service. PLEASE HELP ME, WHAT CAN I DO??? In Argentina is too expensive an iPhone 4S. Please I need help to continue believing in Apple. Thanks a lot. If anybody speak spanish better.  

    Was it purchased from an official Apple Store, not a reseller?  Only Apple Stores sell official factory unlocked phones.  The others sell hacked to unlock phones, and the unlocking is unstable.
    Try these steps, as needed:
    1. Reset phone - press both home and on/off buttons for at least 10 seconds until the Apple logo appears.
    2. Settings > General > Reset > Reset Network Settings.
    3. Replace SIM card (and reset network settings again)
    4. Restore Phone in iTunes using a backup
    5. Restore in iTunes as new, without using a backup

  • Is anyone else having problems with the Canon Online Store?

    In the last month or so, I've had one problem after another with the Canon Online Store; from being unable to delete items from the shopping cart; to not being able to add "in stock" items; disappearing Wish Lists; and just now, I tried to add one lens cap to the 6 or 7 items I already had in the Shopping Cart, and they disappeared.
    I've called, more than once, and I've written, also more than once, to Canon Support about this, but they ignore what I tell them, and tell me there are no problems with the Online Store.  They don't even seem to report to anyone that anyone has complained, because each time is "the first time", even though I've called (more than once) and written (more than once) to them about continuing Online Stores problems.
    Is anyone else having problems with the Canon Online Store?
    Why does Canon not care to track reported problems with the storefront part of their web-site? 
    I'm not trying to insult Canon, it's just that I've been a Canon customer for less than 3 months, and the're only batting .333, so far.  Canon Support was very quick to respond about a concern I had that a 50mm f/1.4 I had just purchased was authentic or not.  In trying to register that lens, I looked up on the Canon web site where to find the serial number.  Since my new lens did not have any numbers there, I was concerned I had been sold a fake.  But, then Canon Support sent me link to a different online document that showed a few different places where it might be, and there it was. 
    Is Canon like that with other problems, as well?  Or is their "batting" average better than my very limited experience? 
    I just love my Rebel T5i, and my Canon lenses (from "the Kit brothers of the Cropped Frame coral":  EF-S 18-55mm f/3.5-5.6 IS STM, and EF-S 70-300mm f/4-5.6 IS USM; to the "Truly Nifty Fifty", the 50mm f/1.4 USM, [the f/1.8 is just a "thrifty fifty"], and finally, the "Super-Macro" MP-E 65mm f/2.8 1x-5x Macro)! 
    Regards and Thanks,
    Calen
    As an old friend used to always say,
    "Keep Looking Up!"
    Calen

    Hi Danny.  Thanks for replying.
    I only use my desktop PC to access Canon's web site, and I've been using Mozilla Firefox for years.  And, yes, it is the latest version.  Since Canon REFUSES to support the use of Firefox on it's web site, WHAT BROWSER DOES CANON SUPPORT?  WHEN did Canon STOP SUPPORTING Firefox?
    I've been told that there are 2 pending orders in my account.  Yet, I NEVER placed those orders!  WHY CAN'T CANON SEE THAT THIS IS A PROBLEM??? 
    Instead of off-target suggestions, and pasted boilerplate REFUSALS TO EVEN LOOK at this issue, I would prefer it if Canon went "old school", and FIXED THE PROBLEM, in the first place!  But, maybe that's a bit too grown up of an answer for you! 
    "Award-winning" support???   And, just exactly WHAT AWARD did Canon "support" WIN for CONSISTANTLY IGNORING REPORTED PROBLEMS???  The OSTRICH?
    Please pull your head out, and FIX this problem, OR YOU ARE THE PROBLEM!!!
    Thank you for your "prompt" attention to this matter!
    Calen
    As an old friend used to always say,
    "Keep Looking Up!"
    Calen

Maybe you are looking for