Session variables is not recognized in my CFC

Hi,
I got a very weird problem today! I have created a simple
login page ( username as an email and a password). This is post to
the same page where I verify from a query if the username and
password are valid. Once the query returns a RecordCount greater
than 0, I create session variables to store the first name and last
name of the user. I can see actually the session variables from a
CFDUMP at that level.
Since I am developping an application that will mix
ColdFusion (mostly CFC) and Flex 3, I have created a CFC where I
store functions needed for the Flex application. One of the
function is fGetUserInfo where I try to collect the information I
previously store in the session scope from the login - such as the
first name. The system stop right there with an error saying that
the session variables are not defined while I have the session
variables appear at the bottom of the debug information in the same
page. This is starting to be over my knowledge and I must missing
an information to resolve this - in other words, I need your
help!!!
I include some code to understand that the problem is not a
mispelling!!! ;-))

I tried to change the savings of the user's information into
cookies instead of the session scope but it does the exact same
error (except it says Element TECHNICIANID is undefined in COOKIE).
In fact, after a little break, I started to think about the
method to access the functions inside the CFC. As it is remote, I
though that it might have a sense of no life on the session scope.
Than I though about the idea to transfer all the informations to
the client with Cookie. CFCOOKIE work fine and I was kind of
animated by my idea! I coded, I tried and it failed. I used at
first the default value of the CFCOOKIE which consists to reside on
the memory like a session but disapear when the user close his/her
browser. So after the first fail I change the expiration for 30
minutes but it failed again and for the same reason: Element
TECHNICIANID is undefined in COOKIE.

Similar Messages

  • Function to get session variable is not working

    I created a report based on the following sql query:
    SELECT EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO FROM SCOTT.EMP
    WHERE DEPTNO = empcust.current_deptno
    empcust.current_deptno is a function which returns the value of the session variable. However, nothing gets returned. The value of the session variable is not found.
    I know that the session variable is being set b/c i have a procedure that sets it and prints out the assigned.
    This is my code for the current_deptno function. If anyone can help, i'd greatly appreciate it!
    procedure current_deptno
    return VARCHAR2
    as
    v_Session portal.wwsto_api_session;
    v_Return VARCHAR2(20); --DEPT.DEPTNO%TYPE;
    begin
    v_Session := portal.wwsto_api_session.load_session('PORTAL','SESS_EMP');
    v_Return := v_Session.get_attribute_as_varchar2('DEPTNO');
    htp.p('Return session var'||v_Return);
    RETURN(v_Return);
    end;

    Hi Imtiaz,
    Could you verify that the variable has indeed a value? You could check via the Session Manager in the Admin Tool. You could also check the Query Log to verify whether the Initialization Block is working like expected.
    Thanks.
    Daan Bakboord
    http://obibb.wordpress.com

  • Filter view with session variable does not display value properly.

    Hi All,
    I have a very unique issue and I am not sure if anyone ran into this before.
    I have a prompt in my dashboard and a link to a report. The session variable default the value to the current value (term)
    when I click the link to the report I get the following value, on the filter view of the report: Term Code Desc is equal to NQ_SESSION.CSA_Analysis_Term
    however if I click the go button in the prompt I get the value: Term Code Desc is equal to 2030 (2011 Spring)
    does anyone have a solution to this issue
    thanks

    Hello,
    Have the same issue. Any solution. Gurus plz help.
    thanks,
    deep

  • Non-system session variable is not initializing

    Hi,
    I have created a non-system session variable using Row wise initialization, and using it in answers to filter a column. it is displaying below error
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 23006] The session variable, NQ_SESSION.Visible_All_Offices1, has no value definition. (HY000)
    I have tried all possible ways like giving the session variable in SQL result set, giving with quotes and without quotes. In all ways it is throwing the same error.
    I think this variable is not getting initialized when starting the session, is there any way to check it. this variable is also not showing in Manage > Sessions > Variables in OBIEE Admin.
    Please reply, if anyone faced similar issue. I am trying this from last 2 days.
    Thanks,
    Ash.

    When you run this sql query against the database, are you seeing results? and why are you using non-system session variables for this? Session variables are usually used to retrieve data into variables based on the user login.
    Check the following things:
    1) In variable target, make sure the row-wise initialization is checked.
    2) Make sure the cache option is UN-checked
    3) Run the sql against the database and make sure it is retrieving results.
    4) Try this in init block:
    select distinct 'Visible_Regions', NVL(Regions, '0') from SH.Regions_Dim A inner join SH.USER_Table B on A.employee_ID = B.employee_ID;
    -Amith.

  • Server hangs and session variable value not maintained.

    dear all,
    this is exteremetly urgent. i upgraded my tomcat to 4.1.24.but i have problems running the same code which was working earlier, i get null in the value of session variable. and also get the following error
    ////////////////error got /////////////
    Compile failed; see the compiler error output for details.
    at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842)
    at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
    at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:317)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext
    .java:473)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
    .java:190)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
    95)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:256)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
    t.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:191)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
    t.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
    2415)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:180)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
    t.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
    rValve.java:171)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
    t.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:172)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
    t.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:174)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
    t.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:22
    3)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
    :594)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
    ssConnection(Http11Protocol.java:392)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
    :565)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
    ool.java:619)
    at java.lang.Thread.run(Thread.java:536)
    ///////////////end of error messsge ////////////
    the code where i am getting this message is as follows
    <%@ page session="true"%>
    <HTML>
    <HEAD><TITLE> LOGGED IN ok</TITLE> </HEAD>
    <%@ page import="java.sql.*" %>
    <%! // declaring variables
    String s = "";
    java.sql.ResultSet rs=null;
    java.sql.Connection con;
    java.sql.Statement stmt=null,stmt1=null;
    String username = "";
    String password = "";
    String Ousername = "";
    String Opassword = "";
    String changepass="";
    String usertype ="",useremail="",EmpName="";
    %>
    <body>
         <%      
         try
         //set session for max of 100 milliseconds
         // session.setMaxInactiveInterval(10000);
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         con = java.sql.DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};" +"DBQ=c:/vishal/HelpDesk.mdb;DriverID=22;READONLY=false","","");
              stmt = con.createStatement();
              s = "select * from LoginUser";     
         username = request.getParameter("LogonId"); //get this through prev. form
         password = request.getParameter("txtPassword");
         out.println(username + " " + password);
         // make explicitly to lower case
         username = username.toLowerCase();
         rs = stmt.executeQuery(s);               
                        while(rs.next())
                        //getting data from database
                        Ousername = rs.getString("EmpName");
                        Opassword = rs.getString("Password");
                        useremail = rs.getString("EmailId");
                        usertype = rs.getString("UserType");     
                        if(Opassword.equals(password) && Ousername.equals(username)) //found match correct entry
                             changepass = request.getParameter("PasswordNew");
                             if(changepass != null)
                             stmt1 = con.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE,java.sql.ResultSet.CONCUR_UPDATABLE);     
                             s = "update LoginUser set Password = '" + changepass + "' where EmpName = '" + username +"'";
                             out.println(s);
                             stmt1.executeUpdate(s);
                             stmt1.close();
                             if(usertype.equals("User") == false)//ie admin
                             session.setAttribute("username",username);     
    ************************this value not maintained *********************
                             session.setAttribute("useremail",useremail);
                             session.setAttribute("usertype",usertype);
    ************************this value not maintained *********************
                             //closing connections
                             %>                                                       
                                  <jsp:forward page= "ComplaintType.jsp" />                         
                             <%
                             else //user
                             EmpName = username;
                             session.setAttribute("EmpName",EmpName);                         
                             session.setAttribute("useremail",useremail);
                             //closing connections
                             %>
                             <jsp:forward page="ComplaintCategory.jsp" />
                             <%     
                             }//end if
                        }//while loop                                   
                        //first closing connections then forwarding                    
         %>
                        <jsp:forward page="InvalidLOGIN.jsp" />
                        <%     
                        ///rs.close();
                        ////closing
                        //stmt.close();
         // con.close();
         }//try
              catch(Exception ep)
              out.println(ep);
              System.exit(1);
         %>
    </BODY>
    </HTML>

    hi all,
    thanx a lot for your help,specially hari52
    hari52 strangely enough the code started working,but
    now i have another problem
    after a while my server hangs or gets shutdown ,a
    message is shown as
    "java.exe has generated error and will be shutdown"
    i know that more connections can be a prob. but i
    make sure that connections r closed on each page,also
    i am a newbie and do not have the time at present to
    learn abt. connection pool ,can this problem be
    solved easily?
    it would be a great help again on your part,
    thanx again,You remove the System.exit(1) line from the code inside the catch block
    and try again. That's the reason tomcat getting down. System.exit(1) should not be used inside jsp. it will make the underlaying Servlet Engine to shutdown.

  • Reports containing session variables do not cache

    I have a general report that is filtered using information from session variables, for example which teamleader or supervisor the user has to tailor the report.
    BUT the problem is that any request with a session variable in it from Answers does not hit the cache.
    Actually they do cache but only for that user, not across users. Even when I preload the cache with the report with no filtering, it is not used by subsequent filtered requests.
    Question:
    - it is possible to get the report to cache when the session variable is used on the Answers side?
    - if not does caching happen if used in a WHERE clause in the logical or physical layers
    Otherwise, how to do get this to work?
    Edited by: Rob Scott on 28-Jul-2011 05:16

    Thanks for your reply.
    The problem is this. Imagine you have a table say of the number of calls that each user has made and users belong to teams, so you have a table like this:
    team, user, # of calls
    You also have a session variable containing the team for that user.
    What I do is have a where filter that filters the table depending on the session variable against the team, so each user only sees data relevant to their team.
    This works OK but there is a caching problem.
    If I don't do filtering and just have the report with all the data in it, then that is cached.
    If I then run the same report but with the session variable filtering on, then it doesn't hit the cache even though it is a subset of the first request.
    If you have 10s of teams each with say 20 reports, then that makes 200 requests whereas really it should just pick up the first super-table that is cached.
    I will do more tests but I simply couldn't get it to pick up the cached copy.

  • Cfreturn variable is not recognized when outputing content

    I have a page that i wish to display total invoices paid to a particular contractor. This Page is Runnign CF9. I'm using a CFC page to write my queries and a action page to display the output via a search box from a search page. Whenever i input the invoice id, coldfusion throws the error: Variable RECENT_INVOICE is undefined"  Am i missing something? my syntax is written below:
    <!---CFC PAGE--->
    <cfcomponent>
    <cffunction name="getinvoice" access="public" returntype="query">
    <cfquery name="recent_invoice" datasource="w9">
    SELECT invoice.*, project.*, bid.*, CONCAT(w9.w9fname,' ', w9.w9lname,'  ', w9.w9businessname) AS Contractor, w9.*
    FROM invoice, project, bid, w9
    WHERE invid = #form.invid#
    AND INVOICE.invcontractor = W9.w9ID
    AND INVOICE.invproject = PROJECT.proID
    AND INVOICE.invproject = BID.bidproject
    AND INVOICE.invcontractor = BID.bidcontractor
    </cfquery>
    <cfreturn recent_invoice>
        </cffunction>
    </cfcomponent>
    <!---Display page that show the invoked query--->
    <cfinvoke
      component="invoice.componets.test"
      method="getinvoice"
      returnvariable="recent_invoice">
    <!--- CFC Query --->
    </cfinvoke>
    <!---OUTPUT Items Below--->
    <cfoutput>#recent_invoice.invdate# - #recent_invoice.invjob1# - #recent_invoice.invamt1#</cfoutput>

    Looks like you are referencing a form field in your query; form.invid.  You are not submitting a form, you are calling a cfc so you probably want to add an argument to your function and pass the value when you call it.  Change like so:
    <!---CFC PAGE--->
    <cfcomponent>
    <cffunction name="getinvoice" access="public" returntype="query">
    <cfargument name="invid" type="numeric" required="true" />
    <cfquery name="recent_invoice" datasource="w9">
    SELECT invoice.*, project.*, bid.*, CONCAT(w9.w9fname,' ', w9.w9lname,'  ', w9.w9businessname) AS Contractor, w9.*
    FROM invoice, project, bid, w9
    WHERE invid = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.invid#" />
    AND INVOICE.invcontractor = W9.w9ID
    AND INVOICE.invproject = PROJECT.proID
    AND INVOICE.invproject = BID.bidproject
    AND INVOICE.invcontractor = BID.bidcontractor
    </cfquery>
    <cfreturn recent_invoice>
    </cffunction>
    </cfcomponent>
    <!---Display page that show the invoked query--->
    <cfinvoke
      component="invoice.componets.test"
      method="getinvoice"
      invid="#yourInvoiceNumber#"
      returnvariable="recent_invoice">
    <!--- CFC Query --->
    </cfinvoke>

  • Facebook session expired device not recognized

    I see within facebook under devices recognized that my iPad is not listed, just my iPhone. How can I get it on the list? Perhaps this would stop the session expired messages and constant log ins!

    Try to remove my facebook account from my accounts and resync it.
    From your home screen go to settings then accounts & sync. When you go to sync facebook it'll come up again, click on the notification, log in & sync again.

  • Session Variable is not filtering

    Hi All,
    I have created a seesion variable intialization block using the following query and selected row-wise initialization.
    SELECT 'STATE', CUST_STATE_PROVINCE FROM SH.CUSTOMERS WHERE UPPER(CUST_LAST_NAME) = UPPER(':USER')
    This returns me with the State Province for each user. Now I created a user named 'Walsh' and assigned him to a group and for the group I have given the following filter.
    SH.CUSTOMERS.CUST_STATE_PROVINCE =  VALUEOF(NQ_SESSION."STATE")
    Now, the issue is, when I logged in as 'Walsh' it should show me only states related to this user, but it is showing me all the records, even for other users.
    (I also tried using VALUEOF(NQ_SESSION.STATE) instead of VALUEOF(NQ_SESSION."STATE") but it didn't work)
    What is it that am missing here. Kindly guide me
    Thanks in advance,
    Imtiaz.

    Hi Imtiaz,
    Could you verify that the variable has indeed a value? You could check via the Session Manager in the Admin Tool. You could also check the Query Log to verify whether the Initialization Block is working like expected.
    Thanks.
    Daan Bakboord
    http://obibb.wordpress.com

  • Qosmio G30: Vista upgrade session: new RAID not recognized

    Hello everyone
    I tried to upgrade vista by manual upgrade option, but 2 problems occured:
    1. I couldnt remove these applications (not listed in Control Panel>Add/Remove)
    ->Bluetooth ACPI by Toshiba
    -> TOSHIBA TV TUNER
    -> Nvidia nView Desktop manager
    -> windows msnger 5.1
    Next, I ignored them and proceeded, i faced a new problem, the new RAID drivers cannot be recognized in the partition screen.
    If i could solve these problems I will get vistaif you guys have some ideas that would be great.

    hi Togan,
    New BIOS for the G30, G35:
    Version 3.30 01-25-2007
    Modified the BIOS to be Windows Vista-capable.
    Added Intel requirements to improve stability when using the Core2 Duo as a Single Core Processor.
    Corrected: A SmartCard carrying TI controller is constantly set to disabled.
    Corrected: Ensured Wake-on-LAN capability from both wired/ wireless LAN.
    Corrected: Ensured a remote controller to work Express Media Player.
    Corrected: Exclamation (!) mark is displayed when booting a TV-tuner model while the RF switch is turned OFF.
    Corrected: S3-mode wakeup issue relating to the remote controller. (Japan models only with EC/KBC V1.10)
    This BIOS supports both Windows Vista and XP.
    Francisco

  • Session variables is not getting updated in JSP

    Hi Floks,
    I had a situation where in i need to populate the drop down depending on the action perfomed by user in menus.
    An action method is triggered to load the scneario specific values to drop down
    here is that
       PSSBuilder pssbuilder = new PSSBuilder();
                pssbuilder.getPlanTypesForCreateScenarioSnapshot(this,"S");
                getCCMPPSessionBean().setSelectedPlanType("0");
                this.getDrpPlanType().setRendered(true);
                this.getLblPlanType().setRendered(true);
                this.getDrpPlanType().setDisabled(false);
                Option[] opt = getCCMPPSessionBean().getPlanTypeOptions();
                Option[] tmp = new Option[opt.length-2];
                int j = 0 ;
                for(int i = 0 ; i < opt.length ; i++){
                     if((opt.getValue().toString().trim()).equalsIgnoreCase("SSMP") ||
                   (opt[i].getValue().toString().trim()).equalsIgnoreCase("SRECON")){
         }else{
              tmp[j] = opt[i];
              j++;
    getCCMPPSessionBean().setPlanTypeOptions(tmp);
    // For debug
              opt = pssDetails.getCCMPPSessionBean().getPlanTypeOptions();
              for (int i = 0; i < opt.length; i++) {
                   CCMPPLogger.getLogger().debug(
                             "Value [ " + opt[i].getValue() + " ] Label [ "
                                       + opt[i].getLabel() + " ]");
    in my JSP im doing this
    <ui:dropDown id="drpPlanType"
                                                                          binding="#{PSSDetails.drpPlanType}"
                                                                               items="#{CCMPPSessionBean.planTypeOptions}"
                                                                               selected="#{CCMPPSessionBean.selectedPlanType}"/> i can see the logs with the values i expected from my action method.
    where as comming to the jsp its showing some other things other than which i see in logs..
    Please help me
    Thanks & Regards,
    Shivaji Byrapaneni.

    hi,
    testdownload.setTocopy(blank);
    check in testdownload class weather setTocopy (..) function is define or not
    public void setTocopy (datatype var)
    }

  • Session variable not storing in custom trigger

    I have a custom trigger in which I want to store a session variable , so i can use the value in the insert transaction which happens after. But for some reason the session variable is not stored, resulting in the data not being stored.
    any clues would help.
    rudi
    here are the relevant code:
    //start Trigger_Custom_Subject_Mentor trigger
    function Trigger_Custom_Subject_Mentor(&$tNG) {
    //Check subject exists
    @session_start();
    $_SESSION['sb_id'] = $subject_id;
    //end Trigger_Custom_Subject_Mentor trigger
    // Make an insert transaction instance
    $ins_share = new tNG_insert($conn_smart);
    $tNGs->addTransaction($ins_share);
    // Register triggers
    $ins_share->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1");
    $ins_share->registerTrigger("END", "Trigger_Redirect", 90);
    // Add columns
    $ins_share->setTable("`share`");
    $ins_share->addColumn("share_item", "NUMERIC_TYPE", "POST", "share_item");
    $ins_share->addColumn("share_subject", "NUMERIC_TYPE", "SESSION", "sb_id");
    $ins_share->setPrimaryKey("share_id", "NUMERIC_TYPE");
    // Register triggers
    $ins_share->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1");
    $ins_share->registerTrigger("BEFORE", "Trigger_Custom_Subject_Mentor", 50);
    $ins_share->registerTrigger("END", "Trigger_Default_Redirect", 99, "share.php?item_id={share_item}");

    hi User,
    1) Pull a dummy column in Fx use the Session variable --->(Variable -->session )
    2) Next, goto narrative view in Narrative view section use @1
    3) If u want you can hide the column that we created in criteria section

  • ODI variables not recognized in filename

    Hi,
    Do you know how to force ODI to recognize the varieble in the filename ?
    The file name is :
    123#VARIABLE456.xsv
    and the variable #VARIABLE is not recognized by ODI 11g
    If I put the variable at the end of the filename ( eg 123456#VARIABLE.csv ), variable is recognized but this is not exactly that I want.
    Thanks!

    Try to give PROJECT_CODE.VARIABLE name i think it will work
    or try put a Underscore and place your variable and test it, is it working or not.

  • Session variables being lost

    In my onApplicationStart method (which should tell you I'm
    using an Application.cfC, not cfM), I have a cfif loop that passes
    a value to a custom tag and returns a form variable. I'm then
    reassigning that variable to a session variable. In IE, this works
    just fine; in Firefox, though, the session variable is NOT being
    set.
    What might be causing this, and is there a workaround?

    The issue referred to an external CF custom tag, which called
    another demo application to set a testing user. However, after
    further testing, I realize that demo app won't function properly
    with this application, so I've removed it.
    Authentication is being set by an LDAP query; this
    application that I am working on is going to be a sub-application
    of a larger application, and the authenticated user is being set as
    a session variable as well (I think...). However, I'm creating a
    new session variable for this application, and simply passing the
    authenticated user into my app (the outer app uses the variable
    auth_user; I'm using the variable authuser, so there is no name
    conflict).
    Again, it is IE that is not persisting the session. Firefox
    is doing so. I have looked in the advanced settings for IE, and
    there is nothing about persisting session variables to check or
    uncheck. Also, this application will probably be used mostly by
    users using IE 6 with default settings, so I'm going to need to
    find a workaround for IE.
    Your help is most appreciated.

  • 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>

Maybe you are looking for

  • Error message Plug-ins not upgraded, cannot open

    A client sent me a CS3 InDesign that won't open. It says my plug-ins are not upgraded. It lists all the plug-ins and they are features that already exist in InDesign such as preflight and collect. How can I get the file to open?

  • Periods disappear after a number list

    Every time I try to make a numbered list in a column the periods disappear.  I tried to add them manually but they still disappear. any help is appreciated. Pages '09 version 4.1

  • How to handle change in RFC module inside webdynpro

    Hi All! I am developing a rather large webdynpro application. The development is a "work in progress" meaning that from time to time we find that there are requireemtns for additional fields in some of the tables / structures of the RFC module. Norma

  • Skalierung der y-Achsen bei n-Systemen im Report

    Hallo. Ich habe folgendes Problem: Nachdem ich im VIEW mit dem Button "n Systeme" jeden Kanal in einem eigenen Achsensystem anzeigen lasse (aber in einem Bereich, mit gleichem x-Kanal) und das ganze dann in den Report transferiere (Button "Transfer n

  • How to make view automatically scroll when keyboard show up

    Hi all I'm like a totally noob for objective-c coding, let alone the iPhone programing. :P Anyway, I somehow manage to create a simple application that receive input via UITextField, do some simple math, then display the result in other UITextFields