Regarding session in flex

hi,
My question is ,how i have set session in php and in flex. i could not know how to set session in flex and php.How to handle session in flex.
Please provide me solution to solve the problem.
Thanks and Regards,
venkat.R

Hi Venkat,
You have to save PHPSESSID. for each request you made to server send this as URLVariable.
I think this should work.
let me know If it is helpfull.....
Thanks,
Vikram

Similar Messages

  • Regarding maintaining session in flex

    Hello,
              I am developing a flex application which is using jsp for database connectivity. I am using HTTP request for connecting to jsp page and passing and retrieving parameters. Now I wanted to ask how can I maintain session in flex so that I can know which client has logged into the system and on the basis of that can assign privileges to the client. Is it possible in flex and how?Reply needed urgently.
    Thanks in advance.

    Hi a.bhavika,
    There is not specifically any session management in Flex as it runs everything on the client side if at all you want to mainatain you can maintain it on the server side. ...and I think for your case I dont think you need any session managemenet as at the time of login only you can identify which user has logged in to the syetem and based on the user logged in you can load all the previleges of that particular user in the Flex application.
    Check out the links below for your understanding...
    http://www.forta.com/blog/index.cfm/2006/9/24/flex-and-session-state-management
    http://www.assembla.com/wiki/show/romoz/Session_Management_in_Flex
    Thanks,
    Bhasker

  • Session in Flex

    You can Use the following class as a session in flex..
    [Bindable]
    private var session:Session = Session.getInstance();
    How to insert data to session
    session.setAttribute('username','sanka')
    How to retrive data from session
    var userName:String=session.getAttribute('username');
    http://dl.dropbox.com/u/7375335/Session.as
    package model
        import flash.utils.Dictionary;
        [Bindable]
         * @author Sanka Senavirathna
         *<p>
         *    Conforms to Singleton Design Pattern.
         *     </p>
         *    <p>
         *        Session.getInstance().getAttribute(key)
         *        Session.getInstance().setAttribute(key,value)
         * Code example for client
         [Bindable]
         private var session:Session = Session.getInstance();
         session.getAttribute('name')
         *    </p>
        public class Session
            private static var instance:Session = new Session();
            private var dic:Dictionary=new Dictionary(); // keep user session
            public function Session()
                if (instance != null) { throw new Error('Cannot create a new instance.  Must use Session.getInstance().') }
             * This Session is a Dictionary that keep key value pairs.Key can be object and value can be object.
             * [Bindable]
             * private var session:Session = Session.getInstance();
             * @langversion ActionScript 3.0
             * @playerversion Flash 8
             * @see getAttribute
             * @see setAttribute
             * @author Sanka Senavirathna
            public static function getInstance():Session
                return instance;
             * [Bindable]
             * private var session:Session = Session.getInstance();
             * Session.getInstance().setAttribute(key,value)
             * <p>example
             * session.setAttribute('username','sanka')
             *</p>
             * @langversion ActionScript 3.0
             * @playerversion Flash 8
             * @param key Describe key here.
             * @param value Describe value here.
             * @see getAttribute
             * @author Sanka Senavirathna
            public function setAttribute(key:*,value:*):void
                dic[key]=value;
             * [Bindable]
             * private var session:Session = Session.getInstance();
             * Session.getInstance().getAttribute(key)
             * <p>example
             * var userName:String=Session.getInstance().getAttribute('username');
             *</p>
             * @langversion ActionScript 3.0
             * @playerversion Flash 8
             * @param param1 Describe key here.
             * @see setAttribute
             * @author Sanka Senavirathna
            public function getAttribute(key:*):*
                return dic[key];

    I think This will help you to keep your shaired data in single place.this will optimize your program by
    reducing database hits,
    reducing Server hits
    Onece you retrive the data then put it into session (flex) and retrive it when you need..For example username in system.when user logged successfully
    put the user object in to session and hide the login component.then pop-up your other component.But you can access the user data from session by using
    var user:User=Session.getInstance().getAttribute('user'); something like that.
    Hope this will help you.
    enjoy
    happy cording

  • Sessions in Flex

    Can anyone tell me how sessions work in Flex? From a browser perspective, I understand when a new session is created the ID is saved into a session cookie client-side and this ID is used to link the browser to the server-side session. But I can't find any cookies that relate to my Flex application (assuming it uses cookies).

    Session informatione is, basically, every variable you create and store in the Flex application.
    Sessions cookies are a work around for the stateless nature of HTML Pages.  Every HTML page exists in isolation andk nows nothing about any other HTML page or the history of the user viewing that page.  The server sets a cookie to match the request up a request with a server side session.
    In Flex, there is only one page request, so no need for cookies to keep track of sessions.  The complete app exists 'once' for each user; as opposed to the server side code which is shared across all users.
    That said, if you need sessions for your server side code; remote requests from Flex will include the cookie information set by the server; which will allow said requests to match your remote call to a server side session.
    Flex does not have access to read browser cookies, although it may be possible to do so using ExternalInterface and JavaScript.

  • How to create a login session in flex?

    Hi there,
    I have a flex application with two states. One is a "login" state which is a screen with username and password. The other state is "loggedIn" state which is a screen with a small application. As soon as the user credentials are checked from the back end, based on it's success, I'm changing the state to "loggedIn", else there is a message to the user about login failure in "login" state itself.
    My problem is if I'm in "loggedIn" state and if I hit refresh button of the webpage(F5), it goes back to the login screen i.e., it just restarts the application..
    How can I control this? Is there something like login session which can do the trick?
    Appreciate your help...
    -Deepak

    Flex code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="getSession.send()">
        <mx:Script>
            <![CDATA[
                import mx.rpc.events.ResultEvent;
                public function getSessionStuff(evt:ResultEvent):void
                    saveInfo.text = evt.result.info;
            ]]>
        </mx:Script>
        <mx:HTTPService id="startSession" showBusyCursor="true" method="POST" url="http://localhost/startSession.php">
            <mx:request xmlns="">
                <stuffToSave>
                    {saveInfo.text}   
                </stuffToSave>
            </mx:request>
        </mx:HTTPService>
        <mx:HTTPService id="getSession" result="getSessionStuff(event)" showBusyCursor="true" method="POST" url="http://localhost/getSession.php"/>
        <mx:Button x="602" y="323" label="Start Session" enabled="{saveInfo.text != ''}" click="startSession.send()"/>
        <mx:TextInput id="saveInfo" x="563" y="293"/>
    </mx:Application>
    setSession.php code;
    <?php
        session_start();
        $_SESSION['loggedIn'] = $_POST["stuffToSave"];
    ?>
    getSession.php code;
    <?php
        session_start();
        if($_SESSION['loggedIn'])
            echo "<info>".$_SESSION['loggedIn']."</info>";
        else
            echo "<info>nothing has been saved</info>";
    ?>
    ta daa

  • Regarding sessions in Jsp

    Hi All,
    I have developed one web application using JSP's, which is accessed by more than 500 employees at a time. today i noticed that some employees getting another employee data, who is also accessing at same time. i am not able understand what is reason behind this? while retrieving data from database, i am checking with employee code every where.
    and one more thing, my JSP having three frames in a single page. sometimes one frame is refreshing and another frame is not refreshing.
    is this situation related sessions or cookies or cache data....
    i am using Tomcat 6 as my web server.
    please suggest me, what are the precautions i need to take while releasing a application into the web.
    regards
    Visisht.

    NareshParimi wrote:
    I have developed one web application using JSP's, which is accessed by more than 500 employees at a time. today i noticed that some employees getting another employee data, who is also accessing at same time. i am not able understand what is reason behind this? while retrieving data from database, i am checking with employee code every where. The code is not thread safe. This can only be caused by poor written code logic without solid background knowledge. For example holding a request/session scoped reference as a servlet instance variable, or as a static variable or as an application scoped bean, etcetera.

  • Need help regarding EP KM Flex UI : Filtering Resources

    Hi All,
    I implemented the blog u201CEP KM Flex UI : Filtering your resourcesu201D (Blog: http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2102) on my local server (EP 7.0 SP23)
    I did some debugging and came to the conclusion that the filterparameters are being set correctly, but the ResourceFilter itself is not being called. (It's calles only once  - the first time when it is accessed).
    I have creaed KM Navigation iview and assign the layoutset (created based on  blog)when ever click the Preview the filter work perfectly and after whenever click on u201CFilteru201D button , filter not working.
    u2022The problem seems this:
    after click on "Filter" button, the runtime environment correctly calls "onSetFilters" event handler, but at the end of this method,
    the execution flow don't invoke "filterResourceList" method in the "SimpleResourceFilter" class.
    if any one found the solution please help me to solve the problem.
    Is there any other procedure to get the "ResourceListFilter".
    Thanks & Regards,
    Srinivas.

    Hello Kevin,
    Could u please let us know if you solved this problem
    Thanks

  • HTTP Session in Flex 2

    Hi,
    I want to know how to work with the HTTP Session object in
    Flex 2?
    Piece of code is really appreciable.
    Thanks,
    -Sameer

    Check out the example from the docs:
    http://livedocs.macromedia.com/flex/2/langref/mx/rpc/http/mxml/HTTPService.html#includeExa mplesSummary
    That should get you started...

  • Regarding Session execution in Background

    Hi Gurus
        While I am uploading the flat file using vb01 tc in Back ground using submit rsbdcsub, I am facing the following problems:
    By execute the program,The session is creating with no "new" or "error" status.
    This is Happening because when I tried in foreground the records are processing after I pressed the "save" button only.This is happening for all records.even though the records are mapping absolutely properly I need to press save button each time to process that record. By the "enter" key it is not processing.
    Beacuse my requirement is to process the records in Background I required no user interaction while processing.
    How can I resolve this.
    Your suggestions and views are highly encouragable.
    Please respond quickily.
    Regards,
    Kumar

    Are you doing LSMW or BDC? if you are using recording then you must have missed the saving of it.
    let me know more details.

  • Query regarding session timeout

    Hi all,
    I have a scenario. My OAF page session gets timed out after 15 minutes and prompts me to login again. But before logging in, I just clicked on the back button of my browser and I was able to see the previous page. Can anyone please advise me how to resolve that loop-hole?
    Regards
    Geethu
    Edited by: 982489 on Jan 17, 2013 5:26 AM
    Edited by: 982489 on Jan 17, 2013 5:35 AM

    Try this in Process Request. This will throw an error when back button is clicked. Refer to OAF Dev guide for more details on isBackNavigationFired
    if (pageContext.isBackNavigationFired(true))
    pageContext.redirectToDialogPage(new OADialogPage(NAVIGATION_ERROR)); //This will divert you to error page if back button is used.
    //your processRequest code
    Thanks
    Shree

  • Regarding Session log messages format..

    Hi All,
        I am reading session logs as follows,
        CALL FUNCTION 'RSTS_READ'
        TABLES
          DATATAB  = LOG_TABLE
        EXCEPTIONS
          FB_CALL_HANDLE =  4
          FB_ERROR       =  8
          FB_RSTS_NOCONV = 12
          FB_RSTS_OTHER  = 16
          OTHERS         = 16.
    I am getting all my messages in the Log_table,
    But those messages or not formated is there any Function module to format the session log messages ??
      Plz let me know if any ASAP.
    Thanks
    Suresh

    hi,
    try with FM format_message, it works.
    see the sample code,
    data: l_message type string.
          if tab_error-msgtyp = 'I' or tab_error-msgtyp = 'S'.
            call function 'FORMAT_MESSAGE'
              exporting
                id        = tab_error-msgid
                lang      = 'EN'
                no        = tab_error-msgnr
                v1        = tab_error-msgv1
                v2        = tab_error-msgv2
                v3        = tab_error-msgv3
                v4        = tab_error-msgv4
              importing
                msg       = l_message
              exceptions
                not_found = 1
                others    = 2.
            if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            endif.
    reward points if useful,
    regards,
    seshu.

  • Question regarding forms in Flex 3

    Hello,
    I currently have a Word form document that is filled out and then converted to HTML and displayed on several monitors at various workstations throught my office.
    I would like to use Flex 3 to customize this process a little. I want to be able to create a Flex application that a manger can use to fill in the various forms, using combo boxes, etc, then export it to the workstation monitors for employees to view. The information must be locked at the workstation - employees can not have the ability to change the information.
    Can I do this with Flex or is it better to jsut stick with the Word document? There will not be a need for any database interaction (unless it is required to disable functionality on the workstation monitors).
    I hope I explained what I need clearly enough!
    Thanks for any help!

    People viewing the data would access the Flex app via a URL, and the manager could use the "admin" section of the app to enter the data.
    You would need something on the back end to store the data entered by the manager.
    You could use AMFPHP to implement a "push" technology to update viewers screens with new data automagically.
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com

  • Urgent regarding session variable

    Hi Everyone,
    I have a prompt having fromdate(calendar ctrl) and todate(calendar ctrl) and one orderID(here it is multiselect). Now my requirement is i should select an order ID from the multiselect and when i hit go the date should be prompted for the fromdate and todate and these should pass in the report.
    Please help me how can i pass the session variables for the 'fordate' and 'todate' based on the orderid i am selecting from multiselect.
    Thank you so much for your help.
    Thanks,
    chakr

    Hi,
    In the Dashboard prompt u can see edit column--> edit column formula--> here select varaible type as ---> session then include...see the screen short.
    http://imageshare.web.id/images/2c3f2h66sb7l5nzfittl.jpg
    1) In your DB Prompt go to Default To
    2) Select Server Variable
    3) NQ_SESSION.startdate and NQ_SESSION.enddate
    4) Save and test
    That should work well for you. Here is a link to a jpg that you should probably save for future reference. It'll show you the proper syntax to use in different situations.
    http://shivabizint.files.wordpress.com/2008/10/obiee-variables-overview.jpg
    Thanks
    Deva

  • Implementing Session in flex (Store an object in Session)

    Hi All,
       Is it possible to store an array collection in session ? How can this be implemented ?
    Thanks

    Have the password visible??? Why??? All you have to do is to capture the password that the user typed in and pass it as a variable to the connection string.
    Say, if you are using the JDBC:ODBC bridge, it will be something like this:
    Connection con = DriverManager.getConnection(
    url, login, password);
    //where url, login, and password are all variables.
    Hope this helps.

  • Regarding session handling in BSP

    hi all,
        we have integrated our BSP application to EP 5.o, we have used 'existbspapplication'(used buffered page) function in our default page to handle the sessions.
       and its working fine, but now we have to integrate it to the  EP 6.0 and we find the sessions are not terminated, and tend to remain after closing the application manually.
       my question is does portal handle sessions if yes, tried the same(by removing session handling code from default page) but could not get the desired result. is there any other way to handle sessions in EP 6.0
      thanks,
      raju
    Message was edited by: krishnam raju

    Hi,
    Did you set the checkbox for portal integration on in the properties of the BSP page?
    Check also
    http://help.sap.com/saphelp_nw2004s/helpdata/en/83/132197c3564643af326a5ebccb604f/frameset.htm
    Furthermore, check things like
    /people/eddy.declercq/blog/2005/11/15/enemy-of-the-state
    /people/eddy.declercq/blog/2006/03/20/wake-me-up-before-you-go-go
    Eddy

Maybe you are looking for