Stateless - server side cookies

Hello,
I am having 2 problems in my stateless MVC BSP application.
1. I am setting and getting table values using server side cookies. In page 1 - I am setting values in cookie. its not accessible in page 2 but they are accesible in page 3.
2. When the application is closed by closing the IE, the server side cookies are in the server. How can I delete server side cookies if the application is closed? is it possible at all??
3. I used delete server cookies - How can I delete cookies that were left undeleted due to the previous point - closing the application as such???
I tried using session id as static and also sy-uname.....but the Id's stored in sscookie table have dynamic session ids.
Please suggest..
Thanks
Thilothama

hi
good
go through these links which give you idea about deleting the server side cookies.
http://wp.netscape.com/newsref/std/cookie_spec.html
http://curl.haxx.se/rfc/cookie_spec.html
in sap->
http://help.sap.com/saphelp_nw04s/helpdata/en/bd/4cd23a09313b37e10000000a11405a/content.htm
thanks
mrutyun

Similar Messages

  • Using Server Side Cookies between pages of a BSP application

    Hi,
    I have Page1 which will retrieve some data into a internal table. Once user performs an action I want to set a server side cookie in Page1 and then retrieve that cookie with data in Page2 of the same BSP and display it?
    Is this possible using set/get server cookies?
    Thanks
    Kiran

    Hi Kiran,
    Yes, you can.
    Basically, you set a server-side cookie in the event OnInputProcessing of Page 1 (or the MVC equivalent) :
    cl_bsp_server_side_cookie=>set_server_cookie(
      exporting
        name = 'TEST'
        application_namespace = 'NONE'
        username = 'NONE'
        session_id = 'NONE'
        data_value = <your_data_here>
        data_name = 'NONE'
        expiry_time_rek = 3600 ).
    And, you retrieve this information in the OnInitialization event of Page 2 :
    cl_bsp_server_side_cookie=>get_server_cookie(
      exporting
        name = 'TEST'
        application_namespace = 'NONE'
        username = 'NONE'
        session_id = 'NONE'
        data_name = 'NONE'
      IMPORTING
        expiry_date = w_date
        expiry_time = w_time
      CHANGING
        data_value = <your_data_here> ).
    Best regards,
    Guillaume

  • How to delete server side cookie

    Hy ppl.
    i would like to know how i can get rid of server side cookies which date is in the past?
    I've trie it with
    call method cl_bsp_server_side_cookie=>DELETE_SERVER_COOKIE
    but the there was no result

    hi
    good
    Class CL_BSP_SERVER_SIDE_COOKIE provides methods for setting, getting, deleting, and managing cookies on the server.
    Server-side cookies are persistent data, similar to the usual client-side cookies. However, while on the client-side, there are restrictions that limit the size of cookies to around 4 kilobytes per cookie, the number of cookies to 300 in total and 20 per server or domain, server-side cookies are subject to no such restrictions. A server-side cookie is stored on the database.
    For technical reasons, each individual cookie can be stored in one of the following ways:
    as a field or
    as a structure or
    as an internal table
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2a/31b97b35a111d5992100508b6b8b11/content.htm
    thanks
    mrutyun^

  • [ Server Side Cookie ] Browser blocked all cookie.

    Hi,
    I use server side cookie to pass value between two pages.
    But if I blocked all cookie in my broswer setting, and the server cookie doesn't work.
    How could I pass value in this condition?
    Thank you!

    Hi Eason,
    that's not possible: client settings cannot block the server side cookie.
    Let's assume this coding in the OnInputprocessing at page A:
      username = sy-uname.
      TRANSLATE username TO LOWER CASE.
    Store.
      cl_bsp_server_side_cookie=>set_server_cookie( name                  = 'SEARCH'
                                                      application_name      = runtime->application_name
                                                      application_namespace = runtime->application_namespace
                                                      username              = username
                                                      session_id            = runtime->session_id
                                                      data_name             = 'FOUNDS'
                                                      data_value            = founds
                                                      expiry_time_rel       = '600' ).
    This defines a ssc (server side cookie).
    You can show cookies via report BSP_SHOW_SERVER_COOKIES.
    On page B (the successor of A) you can get the content via:
        CALL METHOD cl_bsp_server_side_cookie=>get_server_cookie
          EXPORTING
            name                  = 'SEARCH'
            application_name      = runtime->application_name
            application_namespace = runtime->application_namespace
            username              = username
            session_id            = runtime->session_id
            data_name             = 'FOUNDS'
          CHANGING
            data_value            = founds.
    Try this.
    Best regards,
    Stefan

  • Problem with server side cookie

    Hi, I have a problem with a server side cookie. I'm trying to store a cookie trough the  cl_bsp_server_side_cookie=>set_server_cookie method in the OnInitialitation event handler of a bsp (my bsp application is non mvc) and then to retrieve this cookie trough the  cl_bsp_server_side_cookie=>get_server_cookie method in the OnInputProcessing event handler of the same bsp. In this cookie i'm storing a internal table but i'm not getting it when i invoke the get_server_cookie method.
    This is the source code that i'm implementing:
    OnInitialitation:
    wa_comunnication_data-mobile = wa-mobile.
              wa_comunnication_data-telefono = wa-tel_number.
              wa_comunnication_data-email = wa-email.
              APPEND wa_comunnication_data to comunnication_data.
               cl_bsp_server_side_cookie=>set_server_cookie(
                  EXPORTING
                   name = 'cook_comunnication_data'
                   application_namespace = 'NONE'
                   application_name = 'NONE'
                   username = 'NONE'
                   session_id = runtime->session_id
                   data_value = comunnication_data
                   data_name = 'comunnication_data'
                   expiry_time_rel = 720 ).
    OnInputProcessing:
    cl_bsp_server_side_cookie=>get_server_cookie(
          EXPORTING
           name = 'cook_comunnication_data'
           application_namespace = 'NONE'
           application_name = 'NONE'
           username = 'NONE'
           session_id = runtime->session_id
           data_name = 'comunnication_data'
          CHANGING
           data_value = comunnication_data ).
         READ TABLE comunnication_data INDEX 1 INTO wa_comunnication_data.
    regards, marcel.

    Why do you need to use cookies in the same BSP Application?
    Try to use below:
        username              = sy-uname
        application_name      = runtime->application_name
        application_namespace = runtime->application_namespace
    <i>*reward each useful answer</i>
    Raja T
    Message was edited by:
            Raja Thangamani

  • Problem with server side state saving ,JSF 1.1.1

    Hello,
    In my web.xml  the.STATE_SAVING_METHOD setting is s server
    <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>server</param-value>
        </context-param>
    for measurement of application security isn't not allow to change this parameter to client , so the problem  when i access for application and i open a new page via linker for print for example and i would access for my initial page to make change or modify my initial page it s no possible to make any modification because i have a empty bean , but if the state saving is a client i haven't a problem because a tree map is stored in client browser, so my version of JSF is 1.1.1 ,
    So can you explain the cause for his problem
    and what's the solution for my problem ?
    NB:i can't change the parameter for STATE_SAVING_METHOD for a client
    Thank you

    did you search this form, there were lot of discussions in the past about server side cookies, you may find an answer to your problem.
    alternate approache for sending a value from parent page to the pop up window.
    1. when opening the pop up pass the values along with the url (if the size of variable is small)
    alternatively you can store the value in a hidden form field in parent window and access the same from poup window using
    you can simple access the page one form field value in page 2 (pop up) by using the following code.
    window.opener.document.getElementById('hiddenformfieldid').value

  • What's wrong about  "JSF that emits Ajax-widgets" on the server side?

    Hi,
    I just read this chat about Ajax on the server side and I wonder what this comment bellow means when we are building JSF application with Ajax:
    Another thing to consider is that in a pure Ajax application (i.e. one that's not a hybrid of a server-side technology like JSF that emits Ajax-widgets), the server can pretty much just respond to requests from the Ajax client in a stateless manner, and all of the state gets distributed to the client, greatly reducing the memory resources on the server. I'm working on an app like this for IBM Rational and we're really excited about the *decreased* load on the server by distributing state to clients.
    http://www.devwebsphere.com/devwebsphere/2006/04/ajax_and_its_im.html
    Thanks in advance.

    Just created a half an hour ago application:
    http://jsfbyexamples.com/facesTrace/
    shows that the AJAX request spends less time on the server even it walk though the whole life-cycle. This is a very small page, BTW. On the complicated page, the difference will be more significant. It is about server resources.
    About network traffic: Do you actually believe that sending the whole page produces less traffic than the portion updates? Just mathematically speaking?
    OK, I guess you mean the AJAX application requires traffic comes back and forward to produce the AJAX functionality. Non-AJAX application does not produce the traffic, but it does not produce the functionality you have in the first case.
    People who argue about it just try to compare Something to Nothing. So, where is the point?
    Sergey : http://jsfTutorials.net

  • How to create an object alive all the time on a server side

    Hi,
    I work on an Intranet with J2EE technologies. I need an object to do several tasks in background on the server side. Like start scheduled processes on a database and files, stocked on the server. What is the way to do this. I thought to use the JNDI by declaring the object in the Deployement Descriptor, and to manage a timer within.
    I don't know if this works.
    Anyway, my question is how to create an object on the server that is ALIVE ALL THE TIME and visible by the other objects running in the same VM.
    Thank's.

    This may not be the correct design, but I had success doing the following:
    1. Create an Stateless EJB that does a task, i.e. update a database table.
    2. Create a subclass of java.util.TimerTask to call the EJB methods.
    3. Kick off the TimerTask from a servlet.init method.
    Seems to work pretty well to do scheduled tasks, such as refreshing lookup tables. I would imagine the same could be done with an MBean, but I haven't had time to fully understand JMX yet. (It's on the list).
    As for event driven procedures, that can be done through a servlet interface.
    You may also wish to review a scheduler here: http://www.part.net/quartz.html. Note, I have NOT even looked at it yet, so I have no clue if it's any good. But, it is on my list of tools to evaluate (that's a long list) someday when my head's above water. Have a look, and caveat emptor.
    Hope this helps,
    Perry Tew

  • Save the page in server side

    Hi all,
    I have some iViews in my page. That iViews are draggable like as in iGoogle. Now what i want is if i change the position of the iView , after refreshing the iView should be in the same position(what i have changed) . The page should be save in cookies or server side like igoogle.
    The URL of the iGoogle
    [iGoogle|http://www.google.com/ig]
    How can i achieve this using script?
    Help me in this regard.
    Thanks & Regards,
    Hemalatha

    Hi,
    When ever an Iview is dropped to a new position, you will have to reflect this position change in pcd.
    An idea would be to use AJAX and call a portal service where logic is implemented to change Iview position in pcd. You can implement this in personalized context of user, so that the change is made only for current user.
    PCDAPI Remove iView from Page
    Regards,
    Praveen Gudapati

  • Weirdness involving IE, JSP, data scraping and server-side redirecting

    I have a JSP script that validates inputted data. Upon successful input, it will
    1) set a cookie
    2) Do a data scrape to a URL that points to a servlet that performs server-side actions based upon query string data that is formed from your input
    3) Redirect back to itself to ensure cookie availablity and further actions.
    If you run this script on Netscape or Firefox, all is well.
    If you run this script on IE, while [2] works, it seems to be performing [2] twice, because the actions are duplicated (the actions in [2] consist of placing info into flat files so you can see what is going on).
    Does IE have a problem with data scraping + server-side redirection (I am using response.sendRedirect()) that I don't know about?
    Thanx
    Phil

    Agoston_Bejo wrote:
    The problem is that right after having logged in, while you're still in the filter, the beans managed by JSF haven't been put into any scope yet. (The faces servlet hasn't been called yet, so it hasn't had the chance to instantiate the managed beans, put them into the appropriate scopes etc.) So it is request scoped? Just create one yourself. I however don't see any benefit/reason for having the logged in user in the request scope ..

  • How to get session.maintain property on server side?

    Is there a way to trap javax.xml.rpc.session.maintain property on the server side in JAX-RPC compliant web service implementation? I would like to know if the client has enabled session.maintain property to true (which false by default). If not, can I specify the web service to be of "Application" or "Session" scope during deployment time? It used to be the case for Apache SOAP processor. I do not see any mention of that in the JAX-RPC spec.
    Thanks for any pointers.
    -Anirban.

    When I first started to work with JAXRPC I had questions about how web services maintained session across multiple calls and also if it was
    possible to maintain session across multiple web services. I downloaded
    the JAXRPC runtime implementation source code and tell you what I found.
    There is a HttpClientTransport class that handles the actual HttpConnection to the server. It checks to see if maintain session is
    set to true or false. If it is set to true it appends the JSESSIONID to the header variables of the request.
    The very first call gets a response back with header variable
    Set-Cookie: JSESSIONID=blahblahblah
    The HttpClientTransport looks for it and if it finds it takes the cookie and stores it somewhere. Every call after that will check to see if session maintain is true or false. If true, it will send
    the header:
    Cookie: JSESSIONID=blahblahblah
    Hope that helps.
    Mike

  • Why the server side behavior of LoadVars() not consistent?

    In my server side script for FMS app,there is such code:
    var lv = new LoadVars();
    var params = new LoadVars();
    lv.send("http://mysite.com/registerVideo.php", params, "POST");
    The expected behavior is that the request will be as if sent directly from the browser,thus SESSION information is not lost ,which is the exact behavior for my computer.
    But it's not the case for my boss --- session information is lost for him.
    Why the server side behavior of LoadVars() not consistent?
    What do I need to do to make sure session information is not lost @ server side ?

    Oops,why this feature has always worked like charm for me only??
    Below is the server side request caught from firebug:
    POST registerVideo.php
    http://mysite.net/registerVideo.php
    200 OK
    mysite.net
    115ms
    ParamsHeadersPostPutResponseCacheHTML
    Response Headersview source
    Server
    nginx/0.7.67
    Date
    Tue, 29 Mar 2011 14:45:31 GMT
    Content-Type
    text/html
    Transfer-Encoding
    chunked
    Connection
    keep-alive
    Vary
    Accept-Encoding
    X-Powered-By
    PHP/5.2.14
    Expires
    Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control
    no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma
    no-cache
    Content-Encoding
    gzip
    Request Headersview source
    Host
    mysite.net
    User-Agent
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.13) Gecko/20100914 Firefox/3.5.13
    Accept
    text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language
    en-us,en;q=0.5
    Accept-Encoding
    gzip,deflate
    Accept-Charset
    ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive
    300
    Connection
    keep-alive
    Cookie
    pass=angel333; user=liying123; PHPSESSID=8m966mbd070tsdqqodnncesbj5
    Source
    Referer: http://mysite.net/flash/main.swf?sessionId=8m966mbd070tsdqqodnncesbj5 Content-type: application/x-www-form-urlencoded Content-length: 35 name=test&record=live&action=insert

  • Error while saving a workflow via sharepoint designer: Server-side activities have been updated. You need to restart SharePoint Designer to use the updated version of activities.

    While saving a workflow using SharePoint designer on a SharePoint site, I get the following error: 
    Server-side activities have been updated. You need to restart SharePoint Designer to use the updated version of activities.
    Steps to recreate error:
    Login to the WFE server hosting IIS and workflow manager, open SharePoint Designer 2013 and login to a SharePoint site.
    Access the list using SharePoint Designer 2013, in the workflow section, click new workflow. 
    In the new workflow dialog, enter workflow details, click save (see screenshot below).
    Error message is displayed as below:
    After restarting SharePoint Designer, the saved workflow is not seen in the site/workflows or list/workflow section.
    Workaround
    When the above steps are repeated while accessing the site via SPD from any other box besides the WFE/Workflow manager host server, the error is not encountered and its possible to save/publish workflows.
    Notes
    Workflow Manager 1.0 is installed.
    The site has been registered with Workflow manager using Register-SPWorkflowService
    cmdlet.
    Any clue on why is this happening?

    Hi Vivek,
    Please close your SharePoint Designer application, clear/delete the cached files and folders under the following directories from your server installed SharePoint Designer, then check results again.
    <user profile>\appdata\roaming\microsoft\SharePoint Designer\ProxyAssemblyCache
    <user profile>\appdata\local\microsoft\websitecache\<sitename>
    http://www.andreasthumfart.com/2013/08/sharepoint-designer-2013-server-side-activities-have-been-updated/
    Thanks
    We are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How could I clear all my data(bookmarks) on Mozilla server side in new version of Sync (Firefox Account)?)

    Problem is the same as https://support.mozilla.org/en-US/questions/1000745?esab=a&as=aaq
    Also, there was no solution has been given in discussion.
    So, problem that noone could delete all data which have been synced with new Firefox account services.
    I've disconnected all my devices from previous (old) firefox sync system (which worked perfectly on several devices), after that i gone on link https://account.services.mozilla.com/ and deleted all my sensitive data.
    After I've created firefox account in new firefox sync system ( https://accounts.firefox.com ), and all my data (bookmarks exactly) now present in browser twice.

    I have a problem with over 12,000 unwanted bookmarks in my 4 PCs (all standard Mozilla bookmarks that have been replicated). So if I would like to purge my server side data. If I do this by deleting my Sync account can I re-use my same email address to re-open a "new" Sync account?

  • What is the difference between jsp :include and server side include

    what is the difference between jsp :include and server side include(request dispatcher include method)????
    i understand that both request dispatcher include method and jsp:include take dynamic data,so when would one use request dispatcher include and when jsp:include.
    Is the usage interchangeable?i believe jsp include is used only for jsp/html but include directive can be used to include servlets ,jsp and html....correct me if i m wrong and
    do suggest if u hav ny other diff in this context...

    The difference really is: in what format do you want your inclusions? If your environment has many Java developers and only a few designers that focus mainly on, say, Flash, that might push you more towards the server-side include() directive. Or, if you have a large set of pages that receive dynamic content that is displayed in a consistent fashion (such as a workflow header area on a page).
    If, on the other hand, you have more web designers, there may be a greater desire to deal in markup rather than Java code. Java developers themselves might prefer to view markup (JSP) that more resembles the eventual output than something occuring in Java code.
    Finally, there are considerations of tiering. While it is totally possible to (and I have previously) implement 'view classes' that render markup or generate layout templates, JSP's offer, IMO, a subtle, psychological advantage. By forcing a developer to work in a different format, markup versus Java source, the separation on view from controller and model becomes a bit easier. It is still possible to make mistakes, but if a developer at some point notices, "Wait, I'm in a JSP, should I be importing a java.sql class?", then the choice to use JSP includes has paid off in spades.
    - Saish

Maybe you are looking for