How to disable client cookie using Servlet code

Hi All,
          I want to disable the client cookie using JSP or servlet code.Is it possible how I can do it.
          Thanks in Advance .

Hi,
          first of all, the URL rewriting option (URLRewritingEnabled) in the weblogic.xml must be set to true.
          Now, for all first-timer web requests the BEA WLS always uses URL rewriting in addition to cookies to see wether the browser accepts cookies or not.
          I would try to rip of all of the cookies in the header, then flush the response to force the http header to be written.
          I have never tried it and has no idea if it will work, however the teory behind supports the idea.
          This will not work for toggling session tracking mechanism from a session already established with cookies, the session will be lost if attempted to do this without the URL-rewriting enabled on the page.
          - Anders M.

Similar Messages

  • How to check whether the browser supports cookie using servlet

    Hi
    I have a servlet that uses session.I want to check whether the browser supports cookie.
    Please help me how can i detect this using servlet.
    could you please include a sample code
    thanks
    sabu

    You can check whether any cookies were sent in the request to your servlet:
    Cookie cookies[] = request.getCookies();
    if cookies is not null (cookies != null) then the browser sending you the request suppoerts cookies.
    If it is null then you would need to do a little extra work. Basically add a cookie to the response going back to the browser. Then send a redirect back to this same servlet. You then would have to add code to check to see whether the cookie was sent back.
    // Servlet named myServlet
    String test = request.getParameter("TEST");
    Cookie cookies[] = request.getCookies();
    if (test == null || !test.equals("TRUE")
    if (cookies == null)
    response.addCookie("testCookies","testCookies");
    response.sendRedirect("myServlet?TEST=TRUE");
    else
    // cookies were sent in the initial request, so
    // browser supports cookies
    else
    // This is the redirect. Check the for the presence of
    // our testCookie
    Hope this helps.

  • Setting value in cookie using ABAP code

    Hai All,
    Is it possible to set value in a cookie using ABAP code.
    Regards,
    H.K.Hayath Basha.

    Hai Thomas Jung,
    In Enterprise portal SAP has standard functionality to set inactivity timeout. We can set whatever time we want, say for example if we set the time as 15 minutes. If the user is not interacting with the system for 15 minutes then portal will logout the user automatically without any information.
    Our user wants a popup to be shown that the system will be logged out due to inactivity.
    Since Portal logout the user automatically without any information. I want to put in my own framework to handle inactivity timeout.
    What idea I have is, when ever user interacts with any function in portal. I will set current time in a cookie. Someother application will read this cookie at regular interval, if the time difference between the cookie and system is 15, then I will force the user to logout by showing a popup screen.
    In our portal we have three different type of application, they are, Java Webdynpro, ABAP-Webdynpro and BSP.
    I think that from Java Webdynpro and BSP we can call a javascript to set value in a cookie, from ABAP-Webdynpro I don't know how to set a value in cookie.
    This is my business requirement. Is there anyother solution to fullfill this business requirement.
    Thanks & Regards,
    H.K.Hayath Basha.
    Let me tell the business requirement.  Our user want to give a popup message when

  • How to disable 'display pdf (using Acrobat Pro X) in browser'?  Note:  The option is unavailable to un-check box.

    How to disable 'display pdf (using Acrobat Pro X) in browser'?  Note:  The option is unavailable to un-check box.

    Hi URT301,
    Please see this document: PDF Ownership when Reader X is Installed with Acrobat. You'll find several solutions to this problem in the FAQ section.
    Please let us know how it goes.
    Best,
    Sara

  • How many servers Client is using now?

    How many Servers Client is using now?
    Please give me rough idea that how many servers will be there in Sand Box and Golden Box ie Dev-Test-Prod?

    Hi SAP Landscape:
    Landscape is like a server system or like a layout of the servers or some may even call it the architecture of the servers viz. SAP is divided into three different lanscape DEV, QAS and PROD.
    - DEV would have multiple clients for ex: 190- Sandbox, 100- Golden, 180- Unit Test.
    - QAS may again have mutiple clients for ex: 300- Integration Test, 700 to 710 Training.
    - PROD may have something like a 200 Production.
    - SANDBOX for research and development
    These names and numbers are the implementer's discreet on how they want it or they have been using in their previous implementations or how is the client's business scenario.
    Now whatever you do in the Sandbox doesn't affect the other servers or clients. Whenever you think you are satisfied with your configuration and you think you can use it moving forward, you RE-DO it in the golden client (remember, this is a very neat and clean client and you cannot use it for rough usage). As you re-do everything that you had thought was important and usable, you get a transport request pop up upon saving everytime. You save it under a transport request and give your description to it. Thus the configuration is transported to the Unit Test client (180 in this example).
    You don't run any transaction or even use the SAP Easy Access screen on the 100 (golden) client. This is a configuration only client. Now upon a successful tranport by the Basis guy, you have all the configuration in the Testing client, just as it is in the Golden client. The configuration remains in sync between these two clients.
    But in the Testing client you can not even access SPRO (Display IMG) screen. It's a transaction only client where you perform the unit test. Upon a satisfactory unit test, you move the good configuration to the next SERVER (DEV). The incorrect or unsatisfactory configuration is corrected in Golden (may again as well be practised in the sandbox prior to Golden) and accordingly transported back to 180 (Unit Test) until the unit test affected by that particular config is satisfactory.
    The Golden client remains the 'database' (if you wanna call it that) or you may rather call it the 'ultimate' reference client for all the good, complete and final configuration that is being used in the implementation.
    In summary:
    Landscape : is the arrangement for the servers
    IDES : is purely for education purpose and is NOT INCLUDED in the landscape.
    DEVELOPMENT ---> QUALITY -
    > PRODUCTION
    DEVELOPMENT : is where the the consultants do the customization as per the company's requirement.
    QUALITY : is where the core team members and other members test the customization.
    PRODUCTION : is where the live data of the company is recorded.
    A request will flow from Dev->Qual->Prod and not backwards.
    1. Sandbox server: In the initial stages of any implementation project, You are given a sandbox server where you do all the configuration/customization as per the companies business process.
    2. Development Server: - Once the BBP gets signed off, the configuration is done is development server and saved in workbench requests, to be transported to Production server.
    3. Production Server: This is the last/ most refined client where the user will work after project GO LIVE. Any changes/ new develpoment is done is development client and the request is transported to production.
    These three are landscape of any Company. They organised their office in these three way. Developer develop their program in Development server and then transport it to test server. In testing server tester check/test the program and then transport it to Production Server. Later it will deploy to client from production server.
    Presentaion Server- Where SAP GUI have.
    Application Server - Where SAP Installed.
    Database Server - Where Database installed.

  • How file dowloading concept works using servlets.

    How file dowloading concept works using servlets.
    We will get window when downloading something from site
    if we close that window downloading stops.
    how this process works if we use servlets .
    Or what are the general concepts for downloading a file

    How file dowloading concept works using servlets.You send a request and get a reply stream. Where the servlet gets the data from is totally irrelevant.
    We will get window when downloading something from
    site
    if we close that window downloading stops.
    how this process works if we use servlets .If you close that window, downloading stops.
    Or what are the general concepts for downloading a fileSend a request, get a reply stream.

  • SAP Fiori how to  disable-web-security using code

    Hi Guys
    I have made SAP Fiori Application.
    Its working on  google chrome browser after disable-web-security.
    i need to disable web security on each & every browser, Ipad, Phone  befor start the fiori Apps.
    Project on My Laptop Kepler Eclipse. I did not upload project on server.
    Please guide me How I  can  disable web security using code on  Fiori UI ...
    Tags edited by: Michael Appleby

    Hi pankaj,
    Hi,
    write this code in your app
    /supress the Same Origin Policy on IE8 & Chrome 
    var domainString = "document.domain"; 
    domainstring = "*.com" 
    'Access-Control-Allow-Origin: *.sap.com' 
    'Access-Control-Allow-Headers: X-KEY'
    Regards
    Umar

  • Setting value in a cookie using ABAP code

    Hai All,
    Using ABAP code is it possible to set some value in a cookie.
    Regards,
    H.K.Hayath Basha.

    Hai Durairaj,
    Can you explain how to do that.
    Regards,
    H.K.Hayath Basha.

  • How to retrieve "env-entry" in servlet code

    i have a pretty straight-forward web app, which contains a servlet, among other things. the web app is packaged in .war, and it in turn is part of a .ear file. i am using WAS 640 sneak preview on windows xp.
    in the web.xml file, i added the following lines:
    <env-entry>
      <description>some texts</description>
      <env-entry-name>myapp.home</env-entry-name>
      <env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value>c:/myapp</env-entry-value>
    </env-entry>
    in my servlet code, i try to retrieve the value for "myapp.home" like this:
    try
    Context ctx = new InitialContext();
    home = (String) ctx.lookup("java:comp/env/myapp.home");
    } catch (Exception ex) {
    ex.printStackTrace();
    after .ear is deployed, i can see in the JDNI Registry (using Visual Admin Tool), myapp.home is added to the tree:
    webContainer
      -applications
        --myCompany.com
          ---myEarFileName
    myWebAppRoot
    java:comp
    env
    myapp.home
    the entry has the correct class name and object value.
    when the servlet code that performs the jndi lookup is called, i get an exception:
    com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at : java:comp
    ??? QUESTIONS:
    #1 what am i doing wrong?
    #2 if the lookup name must contain the entire jndi tree as listed above, then how can this code be portable to other app servers?
    thoughts are greatly appreciated.

    thanks for the hints, but unfortunately they didn't work.
    1. after switching the order of value and type in env-entry, rebuild/redeplpoy, same exception. the ordering  probably didn't matter since even with the reversed order, the name and value showed up correctly under the jndi tree.
    2. well, i tried giving it the full path, starting with 'webContainer', then 'applications' etc, separated by forward slash. now the exception says path to webContainer is not found.
    so what gives? are there no standards?

  • How to disable the inputfield using radio button dynamically in module pool

    How to disable the inputfield on the screen using radio button dynamically in module pool.
    Please suggest .
            Thanks.
    Edited by: Lavanya YH1504 on Jul 30, 2010 1:20 PM

    I got it thank you.
    LOOP AT SCREEN.
        if  screen-GROUP1 = 'LA1'.
           If RADIO1 = 'X'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
         ELSEIF RADIO2 = 'X'.
           screen-input = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    Edited by: Lavanya YH1504 on Jul 30, 2010 1:51 PM

  • How to disable the ribbon using javascript

    when open a PDF document using acrobat X, there is a Tool ribbon in the top right side (there is also a comment ribbon and share ribbon), how to disable or remove the Tool ribbon using javascript?
    I try to use app.listToolbarButtons() and app.hideToolbarButton(...) but not working.
    Any ideas?

    Not possible.

  • How to get XML value using servlet?

    how to get values from a XML file using servlet ? Thank you.
    for example: how can I get the location value (aaa) from this XML file?
    abc.xml:
    <business>
    <location>aaa</location>
    </business>

    Try to use XML Parsers to do the job.
    Use DOM or SAX Parsers that are freely available.
    Some of the popular ones are xerces, DOM, SAX.

  • How do I delete cookies using Safari 5.1.5/Lion

    How do I delete cookies on my IMAC, using Safari 5.1.5/ Lion?

    Safari > Preferences > Privacy > Remove all website data.

  • How to get MAC address using java code

    hi friends
    please write me, How can I get MAC Address of local machine using java code.I don't want to use JNI.
    Please reply me. Its urgent for me
    Thanks in advance
    US

    You have several ways under *nix
    ifconfig -a | grep HWwill output something like
    eth0      Lien encap:Ethernet  HWaddr 00:11:FF:74:FF:B4combined with Runtime.getRuntime().exec("")and Process.getInputStream()you should be able to read it easilly.
    Under Windows (and Linux of course) try jpcap (http://sourceforge.net/projects/jpcap)
    You can also use jnative as a generic tool (http://sourceforge.net/projects/jnative)
    --Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to read a file using servlet

    hi ,
    i've to read a file using servlet ,
    should read the file using servlet and display it in JSP,Could anybody get me how can i do it .
    Shiva

    To do that you need to get the response output stream and write yur file contents to that.
    response.setContentType(mimeType); //Set the mime type for the response
    ServletOutputStream sos = resp.getOutputStream();
    sos.write(bytes from your file input stream);
    sos.close();

Maybe you are looking for

  • Deduction of Sales Tax

    Dear All, We have new Tax policy according to which we have to deduct 16% sales tax for the vendors who are not registered with tax authorities. For example we procure services of $100 from an unregistered vendor then at the time of invoice we need t

  • PR Price Adopted to PO for service item

    We are using idocs which uses BAPI_PO_CREATE1 to load the legacy PO's into ECC. Even though we supply the PO Price which is different than the PR Price for service item, the price is still adopted from PR which we don't want. I checked ML91 and there

  • How can I transfer a site that was made in iWeb to a new web design service? Please tell me I don't have to build again from scratch!!

    I have a site that I update for a large group of educators.  It has years of info and pages and it was all created in iWeb.  It's a great site and people rely on it!  I found out that iWeb is going away and I need to find a way to keep updating this

  • XML in 8.1.6.

    Hi I am trying to install the java classes in an 8.1.6 database (following the instructions of S. Muenches book). I managed to install the xmlparserv2 class, using the file from the JDeveloper disk. I could not however find the xmlplsql.jar file. Wha

  • GR vs INBOUND DELIVERY

    Hi experts, what is the difference between GR and INBOUND DELIVERY ? please guide me in this reward points rgds