Cookies ............correction

Friends I am using cookies in my jsp pages.
Below is how I create my cookies :
Cookie cookie;
cookie = new Cookie("MyCookieName","MyCookieValue");
// setting the age to 1 hour
cookie.setMaxAge(3600);
response.addCookie(cookie);
and retrieve my cookies :
Cookie[] Cookies = request.getCookies();
String CookieName;
String MyCookieValue;
if (Cookies != null)
for (int i = 0;i<Cookies.length;i++)
cookie = Cookies;
CookieName = cookie.getName();
if (CookieName.equals("MyCookieName"))
MyCookieValue = cookie.getValue();
The code is from Marty Hall's book.The code works fine and does create a cookie ,BUT,it creates a session cookie,and not persistent cookie .Actually i am creating persistent cookie(am i right ? ).Can some one explain what could be the problem.
Help !

cookie.setMaxAge(31536000);
That should set the cookie up for one year

Similar Messages

  • BUG: ColdFusion does not handle conflicting cookies correctly

    (I have reported this as a bug - I'm posting it here to hopefully save people from having to go through the same process)
    If I've got a CF instance on test1.k9.edu, and my cookie jar has CFID/CFToken cookies for both 'test1.k9.edu' and '.k9.edu', CF behaves badly in two ways:
    1) A CFDump of COOKIE shows two entries for each of the CFID and CFToken cookies
    2) the values are identical, and match the first one set - NOT the most specific - 'test1.k9.edu' should always take precedence, but the CF behavior is that it only takes precedence if the browser got it before the '.k9.edu' value (browser in this case is FireFox 20.0.1)
    The net result is... that if I browse to foo.k9.edu and it sets CFID/CFToken cookies at the domain level... and then go to 'test1.k9.edu' which does not set domain cookies... I will not be able to maintain a session (assuming that 'test1' has the latest security fixes) at test1.k9.edu until I scrub my cookies - each request will take the '.k9.edu' values, reject them because they didn't originate locally... and issue new cookies (which will be ignored by the next request... and so on)
    This problem is not limited to CFID/CFToken cookies, although this is where the problem is most urgent, as it could be exploited to create a domain-wide denial of service (by effectively blocking session use for all CF instances in the domain)
    The test case is very simple  (change the domain in this example as appropriate for your installation)
    [for this example, all requests go to test1.k9.edu - adjust to match your domain]
    first request - run this:
    <cfcookie name="test1a" value="domain(domain cookie sent first first)" domain=".k9.edu">
    <cfcookie name="test1b" value="no-domain(non-domain cookie sent first)">
    second request - run this:
    <cfcookie name="test1a" value="no-domain(domain cookie sent first first)">
    <cfcookie name="test1b" value="domain(non-domain cookie sent first)" domain=".k9.edu">
    third request - run this:
    <cfdump var=#cookie#>
    ===============
    My tests were all done with FireFox 20.0.1 with ColdFusion 10 (stand-alone), updater 10 applied.  My web server is Apache 2.2.  The same problem is seen with CF9.0.2.
    The same tests run with Railo 3.3.4 (Tomcat 7) produced correct results (value seen in CFDump results is reliably from the most-specific cookie)

    I feel your pain, more so as you are trying to assist in making a product better. I would fire off an email to the top dog, Steve Jobs. As well, Apple should make a habit of trolling the forums here as they are where the real work of fixing and educating Apple customers takes place. I am amazed by the assistance I have had here and try to assist where I can while avoiding anything to make matters worse. Those Top Users just to my right deserve praise and an Apple goodie every now and then. There ought to be a hall of fame too.
    < Edited by Host >

  • ACE load-balancing-Cookie problem

    In our other load-balancing environments the load-balancer-cookie contains the encrypted (real) servername or ip-address.
    We think it's the same on the cisco, for that reason it's in theory not possible, that there are two 'green'-cookies with different values in the same request.
    There are only two possibilities how this could happen:
    a) The healthmonitor (http_probe) fails, the loadbalancer 'thinks' that the realserver is down and redistributes the traffic.
    But in that case we would expect, that the old cookie will be overwritten by the new one and not simply added to the http-header.
    b) The predictor in the serverfarm chooses a new realserver within the same request.
    If that is really the cause of that problem this would be bug in the cisco ace.
    What we found out, is that the loadbalancer performs a 'Set-Cookie'-Operation an every request even if the client submits the cookie correctly.
    For example:
    GET /ips-opdata/scripts/jquery.js HTTP/1.1
    Host: www.xxxxx.com
    User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110303 Ubuntu/10.04 (lucid) Firefox/3.6.15
    Accept: */*
    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: 115
    Connection: keep-alive
    Referer: http://www.xxxxx.com/
    Cookie: green=R339366665; JSESSIONID=28D91FC6FD62A3921354BB36826294C4
    HTTP/1.1 200 OK
    Set-Cookie: green=R339366665; path=/; expires=Tue, 29-Mar-2011 06:33:00 GMT
    Server: Apache-Coyote/1.1
    X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5
    ETag: W/"72181-1298537508000"
    Last-Modified: Thu, 24 Feb 2011 08:51:48 GMT
    Content-Type: text/javascript
    Content-Length: 72181
    Date: Mon, 28 Mar 2011 06:15:19 GMT
    As you can see the cookies: green=R339366665 is transmitted from the client, but the loadbalancer does a Set-Cookie Operation of the same cookie once again. This is an unexpected behaviour.
    We hope that this helps you to figure out the reason of the problem.

    The cookie is sent by the ACE on each response to refresh the timeout value on the client. The value of the cookie doesn't change. This is the expected behaviour and shouldn't break anything in the application / browser.
    For browser-based applications, don't forget to add the "browser-expire" parameter to your cookie-based stickyness config.

  • I have a cookies problem!

    I have enabled my cookies correctly and gone through all the troubleshooting guides, but cookies are still not working properly and many websites are not working, saying I need to enable cookies. Some websites will not even allow me to log in. I'm stuck and unable to even use many websites. Please help I have of course gone through all the Internet options, have deleted history, cache, cookies. I've even tried to manually delete the files. I've also gone through and deleted text files in case one of those files was corrupt and causing cookies not to work properly. I've done the same with private as well. I've checked my firewall settings to make sure that wasn't a problem.

    I was having this same issue. I followed the steps on this page , and it is working for me now. Hope it helps!
    http://mwolk.com/blog/firefox-not-saving-cookies/

  • Question on CSS cookie sticky

    Hi everyone,
    I have a question about CSS cookie sticky.
    - Server issues the following cookie string to the client and it is fixed to 18 bytes.
    Set-Cookie: JSESSIONID=aaabbbcccdddeeefff; path=/
    - Client embedded the following cookie string in the subsequent HTTP header.
    Cookie: xx_user_id=ZZZZ03; com.dummy.xyz.session.cookie=|user|pc|ja|Shift_JIS|default||yellow|/oooo/default.portal|; JSESSIONID=aaabbbcccdddeeefff
    * Note that I made cookie information suitable as example.
    There is the cookie string (JSESSIONID=aaabbbcccdddeeefff) issued by Server in the HTTP header from client but that cookie string (JSESSIONID=aaabbbcccdddeeefff) is located following the cookie string that the client made by oneself at the end of cookie string. And the cookie string and the length of cookie string that client made by oneself might change so the total length of cookie string also might change. It means I can not clarify the total length of the cookie string.
    In this situation, I want CSS to stick with cookie string "JSESSIONID=aaabbbcccdddeeefff".
    The characters of string located following the "JSESSIONID=" (in this case, "aaabbbcccdddeeefff") might change but it is fixed to 18 bytes. The total length of cookie string is 141 bytes in above mentioned example.
    So I informed customer to configure the following parameters to get CSS done cookie sticky for above mentioned cookie string. CSS software version is sg0750303.
    owner test
    content testsv-tcp80
    add service testsv1-tcp80
    add service testsv2-tcp80
    advanced-balance cookie
     string range 1 to 200
    string process-length 18
    url "/*"
    redundant-index 1001
    protocol tcp
    port 80
    vip address xxx.xxx.xxx.xxx
    active
    However CSS was not able to treat the above mentioned cookie correctly which means the subsequent HTTP request was not stuck (persisted) to same server.
    I do not understand why CSS cookie sticky did not work correctly with this configuration.
    Then customer configured CSS with the following parameters to get CSS inserted cookie string and, of course, the result is OK that is CSS could stick the connection to same server.
    owner test
    content testsv-tcp80
    add service testsv1-tcp80
    add service testsv2-tcp80
    advanced-balance arrowpoint-cookie
    url "/*"
    redundant-index 1001
    protocol tcp
    port 80
    vip address xxx.xxx.xxx.xxx
    active
    Has anybody experienced similar thing ?
    Could you please let me know if you have any comment, information
    Your information would be appreciated.
    Best regards,

    the CSS does not learn dynamic cookie.
    You can match a fixed string inside a cookie and pre-define which server to use with that specific string.
    That's why your solution did not work.
    Arrowpoint-cookie is a better solution and easier to implement.
    Gilles.

  • Links no longer showing as visited after closing and reopening tab in Firefox, or closing and reopening Firefox browser.

    <p>(Edited to make easier to read)</p>
    <p>Also, if I click on a link and it turns purple then I refresh the page, the link turns back to blue (unvisited / unread).</p>
    <p>Is this something new with version 7?</p>
    <p>I'm using Firefox 7.0.1 (when did it update to this version?)</p>
    <p>In >Options >Privacy tab
    For 'history' I have selected:
    <br>
    Use custom settings for history
    <br>
    Remember my browsing history: (Checked)
    <br>
    Remember download history: (Checked)
    <br>
    Remember search and form history: (Not checked)
    <br>
    Accept cookies from sites: (Checked)
    <br>
    Accept third-party cookies: (unchecked)
    <br>
    Keep until: 'I close Firefox'
    <br>
    Clear history when firefox closes:</p>
    <p>Only selections checked are:
    <br>
    Cookies
    <br>
    Active logins
    <br>
    Cache</p>
    <p>Also, I always have NoScript enabled and only 'allow' on a case by case basis (even for sites I visit regularly) and even this seems to have some sites already allowed when I revisit them (mainly login URLs) when this didn't used to happen.</p>
    <p>My main issue right now though is the visited links not staying coloured purple (read / visited).</p>
    <p>I love Firefox and don't want to change to another browser if I don't have to (Linus / Ubuntu would be my next choice).</p>
    <p>Thank you in advance for any information you can offer.</p>

    <p>Thanks for the reply cor-el!</p>
    <p><b>Make sure that the History is enabled: Tools > Options > Privacy > History: Remember my browsing history</b>
    <br>
    I have selected:
    <br>
    'Use custom settings for history' with only the following options checked:
    <br>
    Remember my browsing history: (Checked)
    <br>
    Remember download history: (Checked)
    <br>
    Accept cookies from sites: (Checked)</p>
    <p>Keep until: 'I close Firefox'</p>
    <p>Then I have this selection:
    'Clear history when firefox closes'</p>
    <p>And the only 'settings' selected / checked are:
    <br>
    Cookies (CORRECTION: I don't have cookies selected because I always manually delete all cookies whenever I close the browser)
    <br>
    Active logins
    <br>
    Cache</p>
    <p><b>Make sure that you do not run Firefox in permanent Private Browsing mode.</b>
    <br>
    Yes, I've made sure that option is not selected.</p>
    <p>My NoScript settings keeps changing to 'allow' sites when I have it set to be always on (to not allow scripts from any sites) and only allow on a case by case basis even with sites I visit regularly. Could this be correlated?</p>
    <p>Why do I have to use html in order for the text separated into sentences and paragraphs, rather than being bunched all together?</p>

  • [SOLVED] Can only login to Arch forum with Firefox

    Hi everyone,
    I'm a new member and thus do not familiar with the rule. Please tell me if I post in the wrong place !
    I have registered a new account on Arch forum. However, I can only login with Firefox.
    When I try to login with other browser (Opera, Chromium, Konquerer), it says:
    Redirecting
    Logged in successfully. Redirecting …
    Click here if you do not want to wait any longer (or if your browser does not automatically forward you)
    And then redirect me to the previous page without changing my login status.
    When I login with Firefox, everything is normal. My login status is changed and I can post this one !
    I have just installed Arch Linux this afternoon and have not changed anything.
    Does the forum have problem?!
    Anyone has the same problem with me?!
    Last edited by BlueLaguna (2012-11-28 21:42:16)

    Your SYSTEM is broken because a browser does not work? And that requires a reinstall?
    There may be a problem during installation. That's what I mean.
    Anyway, I have just installed Arch Linux. Firefox is still the only browser that work.
    Your time would be better spent fixing the problem first. Cache or configuration, pick one or both.
    I'm pretty sure that cache and configuration are not concerned with this problem. I'm a web developer and I know these stuffs.
    Besides, I don't think that we need to config anything with a newly installed browser. If the default settings do not work with normal website, it's a bad browser (in this case, we have three bad browsers: Konqueror, Chromium, Opera... and may be more).
    I'm using KDE and I don't know whether this problem comes from KDE or not. However, I can login to many other forums with Konqueror, Opera and Chromium.
    This forum may not create the session or cookies correctly when I use other browsers.
    Anyway, If no one confirms that he or she has the same problem, let's close this topic here.

  • Problems with OWA_COOKIE send and get

    Hi all,
    I have a problem with OWA_COOKIE-package. What I'm trying to do is to integrate Oracle eBS and an APEX app. The application resides on different databases and servers.
    I'm basing my code on this white paper:
    http://www.oracle.com/technology/products/database/application_express/pdf/Extend_Oracle_Applications_11i.pdf
    I have the function set up in eBS and it redirects me to my APEX login page. The next step is to pass a cookie with the user name password to the APEX app. Here the problems begins.
    My launch code in the eBS database (lots of hardcoded values just for the test):
    PROCEDURE xxapex_launch (application IN NUMBER DEFAULT 107
                           , page IN NUMBER DEFAULT 1
                           , request IN VARCHAR2 DEFAULT null
                           , item_names IN VARCHAR2 DEFAULT NULL
                           , item_values IN VARCHAR2 DEFAULT NULL) AS
    BEGIN
      OWA_UTIL.mime_header('text/html', false);
      OWA_COOKIE.send (name => 'APEX_APPS_107',
                       value => 'daniel:development',
                       expires => sysdate + 365,
                       path=>'/');
      OWA_UTIL.redirect_url('http://server:8090'||'/apex/f?p='||
                            application||':'||page||'::'||request||':::'||
                            item_names||':'||item_values);                       
    END xxapex_launch;
    The application process in APEX that should read the cookie(on-load before header):
    DECLARE
      c OWA_COOKIE.cookie;
      a wwv_flow_global.vc_arr2;
    BEGIN
      c := OWA_COOKIE.get('APEX_APPS_107');
      a := htmldb_util.string_to_table(c.vals(1));
      :P160_USERNAME := a(1);
      :P160_PASSWORD := a(2);
      IF :P160_PASSWORD IS NOT NULL THEN
        wwv_flow_custom_auth_std.login(
           P_UNAME => :P160_USERNAME,
           P_PASSWORD => :P160_PASSWORD,
           P_SESSION_ID => v('APP_SESSION'),
           P_FLOW_PAGE => :APP_ID||':160');
    __END IF;
    END;The error I get is no-data-found when this is run:
    :P160_USERNAME := a(1);
    The c.num_vals is 0 and what I can understand OWA_COOKIE.get does not find my cookie. Is there anybody out there that can point on what I'm doing wrong?
    Regards Daniel

    Back on this....
    Is there somebody that have successfully implemented the solution described in?
    http://www.oracle.com/technology/products/database/application_express/pdf/Extend_Oracle_Applications_11i.pdf
    Questions:
    Should I create a custom login page or use the default (that using my custom Authentication Scheme)?
    In the white paper where it's described on how to create the application process (that reads the cookie) it says (page 5):
    "This process should be conditional and should not be run if the login page is processing a logout request."
    Does somebody know on how to achive this?
    In my case my eBS is on one server and the APEX installation is on another server, I don't know if that's
    what preventing it to work.
    I'm trying to make a very simple proof of conecpt, my app only contain one login page (the default) and
    one blank HTML-page. I have a database link between my APEX and EBS database (using APPS user). My
    app works fine in a stand-alone scenario. But when I start it from EBS I get the login page (the appl.
    process code has not fired) and if I tries to login using a username and a pwd I can se that the
    appl. process fires and is reading the cookie correctly. The problem is that it "hangs" and it seems that
    appl. process fires over and over again (can see that in my log table).
    My code:
    The Authentication Function
    create or replace FUNCTION demo_ebiz_suite_auth
    (p_username in VARCHAR2,
    p_password in VARCHAR2) return BOOLEAN is
    begin
    __return true; /* can log in with whatever */
    end;
    Application Process - On load: Before header (page template header)
    DECLARE
    __c OWA_COOKIE.cookie;
    __a wwv_flow_global.vc_arr2;
    BEGIN
    __demo_toLog('APEX process', '1');
    __c := OWA_COOKIE.get('APEX_APPS_'||:APP_ID);
    __a := htmldb_util.string_to_table(c.vals(1));
    __:P101_USERNAME := a(1);
    __:P101_PASSWORD := a(2);
    __demo_toLog('APEX process', ':P101_USERNAME '||:P101_USERNAME);
    __demo_toLog('APEX process', ':P101_PASSWORD '||:P101_PASSWORD);
    __demo_toLog('APEX process', ':APP_ID '||:APP_ID);
    __IF :P101_PASSWORD IS NOT NULL THEN
    ____demo_toLog('APEX process', 'before trying to login');
    ____wwv_flow_custom_auth_std.login(
    ______P_UNAME => :P101_USERNAME,
    ______P_PASSWORD => :P101_PASSWORD,
    ______P_SESSION_ID => v('APP_SESSION'),
    ______P_FLOW_PAGE => :APP_ID||':1'
    ____demo_toLog('APEX process', 'after login');
    __END IF;
    EXCEPTION
    __WHEN OTHERS THEN
    ____demo_toLog('APEX process', 'Fel: '||SQLERRM);
    END;
    Maybe I'm doing some simple misstake here but I can't see it. I need a second opinion.
    Thanks.
    /Daniel

  • Session managing testing servlets

    I am running two 5.1 sp1 servers in a cluster using in-mem replication
              with a wl proxy server, all on NT boxes. I've written three servlets:
              Login, Logout, and Test2
              Login creates a new session if one isn't present. Logout kills the
              session if there is one present. Test2 tests for the existence of a
              session.
              -- I start the server and create a new session with the Login
              servlet.
              -- I test with Test2 servlet ( I get Test2: init) and it doesn't see
              the session I had just created.
              -- I reload Test2 and it recognizes the session OK.
              -- It recognizes the session with all subsequent calls to it as well.
              -- Killing the server and making the session failover to another
              server will make the Test2 servlet not see the session for the first
              time again (If that is the first time that the servlet is loaded on that
              particular server).
              Same happens with Logout servlet. It seems that when a servlet is
              initially loaded on a server it doesn't see sessions already present but
              it picks up that info on all subsequent loads. What can I do to make
              sure all my servlets see all the sessions all the time (otherwise this
              failover demo I'm doing is quite useless).
              Thanks, Timur
              

              Prasad Peddada wrote:
              > Timur Maltaric wrote:
              >
              > > Say I had two servers in the cluster to begin with. Sessions were created and killed as users logged on and off.
              > > One server dies suddenly and one is left operating in the cluster. Shouldn't this one that is operating be able to
              > > correctly handle any new sessions that will be created?
              >
              > Yes.
              >
              > From your earlier mail:
              >
              > The log attached to an earlier message shows that Login servlet starts a new session, and writes a cookie. Good.
              > Requesting Test2 doesn't read that cookie and returns session = null. Requesting Test2 again reads the cookie
              > correctly and gets the correct session information.
              >
              > From the log files:
              >
              > Tue May 30 10:17:42 EDT 2000:<D> <ServletContext-General> Found servlet for Virtual Path: '/Test2'
              > Tue May 30 10:17:42 EDT 2000:<I> <ServletContext-General> ServletRequestImpl: ServletPath: /Test2
              > Tue May 30 10:17:42 EDT 2000:<D> <ServletContext-General> Invoking servlet
              > Tue May 30 10:17:42 EDT 2000:<D> <ServletContext-General> Checking ACL: weblogic.servlet.Test2
              > Tue May 30 10:17:42 EDT 2000:<I> <ServletContext-General> Parsing cookies
              > Tue May 30 10:17:42 EDT 2000:<I> <ServletContext-General> ServletRequestImpl: Found cookie:
              > javax.servlet.http.Cookie@b8f4916
              > Tue May 30 10:17:42 EDT 2000:<I> <ServletContext-General> ServletRequestImpl: SessionID:
              > OTPNVO0XpIhya1eIDpzrNar9gwDuzpm198DEKR9ho5uhKqSfIOis7UdLQ0773aTGodGkgNoKH0A3|-5241978140997784602/168297227/6/7001/7001/7002/7002/7001/-1|NONE|-5241978140997784602
              > found in cookie
              > Tue May 30 10:17:42 EDT 2000:<I> <ServletContext-General> ServletRequestImpl: Trying to find session:
              > OTPNVO0XpIhya1eIDpzrNar9gwDuzpm198DEKR9ho5uhKqSfIOis7UdLQ0773aTGodGkgNoKH0A3|-5241978140997784602/168297227/6/7001/7001/7002/7002/7001/-1|NONE|-5241978140997784602
              >
              > Contrary to what you said the weblogic server is reading your session. All the requests are in the same session.
              The first time (notice time) that the request is made for Test2 weblogic server is NOT reading the session info. Second request for Test2 (one you quoted) is OK.
              Why?:
              Tue May 30 10:17:13 EDT 2000:<D> <ServletContext-General> Found servlet for Virtual Path: '/Test2'
              Tue May 30 10:17:13 EDT 2000:<I> <ServletContext-General> ServletRequestImpl: ServletPath: /Test2
              Tue May 30 10:17:13 EDT 2000:<D> <ServletContext-General> Invoking servlet
              Tue May 30 10:17:13 EDT 2000:<D> <ServletContext-General> Checking ACL: weblogic.servlet.Test2
              Tue May 30 10:17:13 EDT 2000:<I> <ServletContext-General> Parsing cookies
              Tue May 30 10:17:13 EDT 2000:<I> <ServletContext-General> ServletRequestImpl: Get query parameter: WebLogicSession found value: null
              Tue May 30 10:17:13 EDT 2000:<I> <ServletContext-General> ServletRequestImpl: SessionID not found
              Tue May 30 10:17:13 EDT 2000:<I> <ServletContext-General> Test2: init
              >
              > Contact support if you have a reproducible test case and we will go from there.
              I am contacting support.
              >
              >
              > I don't think it matters how many servers are in the cluster because none are really failing. Correct me if I'm wrong.
              >
              > True.
              >
              > - Prasad
              >
              > >
              > > Timur
              > >
              > > Prasad Peddada wrote:
              > >
              > > > If you have only one server in the cluster how do you expect it to failover and retrieve your session
              > > > information.
              > > >
              > > > - Prasad
              > > >
              > > > Timur Maltaric wrote:
              > > >
              > > > > There was only one server running in the cluster when these requests were made. That shouldn't be a problem
              > > > > though.
              > > > >
              > > > > Timur
              > > > >
              > > > > Prasad Peddada wrote:
              > > > >
              > > > > > The same cookie is being sent five times as you can see. Are you sure your clustering is
              > > > > > working. I don't think the servers are recognizing each other. Do you have two servers
              > > > > > running when you made these requests.
              > > > > >
              > > > > > C:\TEMP>grep
              > > > > > "OTPNVO0XpIhya1eIDpzrNar9gwDuzpm198DEKR9ho5uhKqSfIOis7UdLQ0773aTGodGkgNoKH0A3|-5241978140997784602/16829722
              > > > > >
              > > > > > 7/6/7001/7001/7002/7002/7001/-1|NONE|-5241978140997784602" weblogic.log | wc -l
              > > > > > 5
              > > > > >
              > > > > > - Prasad
              > > > > >
              > > > > > Timur Maltaric wrote:
              > > > > >
              > > > > > > Here is a snippet from the log. Test2 doesn't recieve the cookie on first load but
              > > > > > > recieves it thereafter.
              > > > > > >
              > > > > > > Timur
              > > > > > >
              > > > > > > Prasad Peddada wrote:
              > > > > > >
              > > > > > > > I don't think domain property applies to your case. Did you try turn on the
              > > > > > > > debugging and did you notice anything wrong. When you requested Login, you should
              > > > > > > > have got a cookie that should have been passed back when you requested Test2. Do
              > > > > > > > you see that in log?
              > > > > > > >
              > > > > > > > - Prasad
              > > > > > > >
              > > > > > > > Description about domains:
              > > > > > > >
              > > > > > > > When searching the cookie list for valid cookies, a comparison of the domain
              > > > > > > > attributes of the cookie is made
              > > > > > > > with the Internet domain name of the host from which the URL will be fetched.
              > > > > > > > If there is a tail match, then
              > > > > > > > the cookie will go through path matching to see if it should be sent. "Tail
              > > > > > > > matching" means that domain
              > > > > > > > attribute is matched against the tail of the fully qualified domain name of
              > > > > > > > the host. A domain attribute of
              > > > > > > > "acme.com" would match host names "anvil.acme.com" as well as
              > > > > > > > "shipping.crate.acme.com".
              > > > > > > >
              > > > > > > > Only hosts within the specified domain can set a cookie for a domain and
              > > > > > > > domains must have at least two (2)
              > > > > > > > or three (3) periods in them to prevent domains of the form: ".com", ".edu",
              > > > > > > > and "va.us". Any domain that fails
              > > > > > > > within one of the seven special top level domains listed below only require
              > > > > > > > two periods. Any other domain
              > > > > > > > requires at least three. The seven special top level domains are: "COM",
              > > > > > > > "EDU", "NET", "ORG", "GOV", "MIL", and
              > > > > > > > "INT".
              > > > > > > >
              > > > > > > > The default value of domain is the host name of the server which generated
              > > > > > > > the cookie response.
              > > > > > > >
              > > > > > > > Timur Maltaric wrote:
              > > > > > > >
              > > > > > > > > weblogic.httpd.session.cookie.domain
              > > > > > > > >
              > > > > > > > > what does this do? What should I set it to?
              > > > > > > > >
              > > > > > > > > Prasad Peddada wrote:
              > > > > > > > >
              > > > > > > > > > Turn on the weblogic.debug.httpd=true and see if the cluster's are receiving
              > > > > > > > > > cookie's or not and try with IE as well.
              > > > > > > > > >
              > > > > > > > > > Try setting this property on the weblogic servers in the backend and see if
              > > > > > > > > > it helps.
              > > > > > > > > >
              > > > > > > > > > weblogic.httpd.session.cookie.domain
              > > > > > > > > >
              > > > > > > > > > - Prasad
              > > > > > > > > >
              > > > > > > > > > Timur Maltaric wrote:
              > > > > > > > > >
              > > > > > > > > > > I am running two 5.1 sp1 servers in a cluster using in-mem replication
              > > > > > > > > > > with a wl proxy server, all on NT boxes. I've written three servlets:
              > > > > > > > > > > Login, Logout, and Test2
              > > > > > > > > > > Login creates a new session if one isn't present. Logout kills the
              > > > > > > > > > > session if there is one present. Test2 tests for the existence of a
              > > > > > > > > > > session.
              > > > > > > > > > >
              > > > > > > > > > > -- I start the server and create a new session with the Login
              > > > > > > > > > > servlet.
              > > > > > > > > > > -- I test with Test2 servlet ( I get Test2: init) and it doesn't see
              > > > > > > > > > > the session I had just created.
              > > > > > > > > > > -- I reload Test2 and it recognizes the session OK.
              > > > > > > > > > > -- It recognizes the session with all subsequent calls to it as well.
              > > > > > > > > > >
              > > > > > > > > > > -- Killing the server and making the session failover to another
              > > > > > > > > > > server will make the Test2 servlet not see the session for the first
              > > > > > > > > > > time again (If that is the first time that the servlet is loaded on that
              > > > > > > > > > > particular server).
              > > > > > > > > > >
              > > > > > > > > > > Same happens with Logout servlet. It seems that when a servlet is
              > > > > > > > > > > initially loaded on a server it doesn't see sessions already present but
              > > > > > > > > > > it picks up that info on all subsequent loads. What can I do to make
              > > > > > > > > > > sure all my servlets see all the sessions all the time (otherwise this
              > > > > > > > > > > failover demo I'm doing is quite useless).
              > > > > > > > > > >
              > > > > > > > > > > Thanks, Timur
              > > > > > > > > >
              > > > > > > > > > --
              > > > > > > > > > Cheers
              > > > > > > > > >
              > > > > > > > > > - Prasad
              > > > > > > >
              > > > > > > > --
              > > > > > > > Cheers
              > > > > > > >
              > > > > > > > - Prasad
              > > > > > >
              > > > > > > ------------------------------------------------------------------------
              > > > > > > Name: weblogic.log
              > > > > > > weblogic.log Type: Text Document (application/x-unknown-content-type-txtfile)
              > > > > > > Encoding: base64
              > > > > >
              > > > > > --
              > > > > > Cheers
              > > > > >
              > > > > > - Prasad
              [att1.html]
              

  • PHP Logic

    This code updates the database record, or inserts a new record.  I am having an issue when it comes to inserting the new tempID field.  Nothing is being inserted.  Here is my code:
    function updateCartDB ($userID, $packageName, $packageID){     // Get the user ID of the username     if($userID != 0){         // Then we use the member ID for them         $userID = getID($userID);     }     if(!$_COOKIE['shopCartID'] && !$userID) {         // This should only be done once!!         // Set a temporary cart ID         // Create a new account for them         // If they are a guest shopping, use cookies for an ID         $ranIDVal = substr(md5(microtime()),rand(0,26),25);         setcookie('shopCartID', $ranIDVal, time()+60*60*24*30); // this = 30 days         $userID = 0;     }     if($userID || isset($_COOKIE['shopCartID'])){         $query = "SELECT *           FROM shoppingCart         WHERE userID IN ('$userID', '$_COOKIE[shopCartID]') && package = '$packageID'";           $result = mysql_query($query) or die(mysql_error());         // If the package already exists for the user, just update the quantity         if (mysql_num_rows($result) > 0) {             $row = mysql_fetch_array($result) or die(mysql_error());             $count = $row['quantity']+1;             mysql_query("UPDATE shoppingCart             SET quantity = '$count'");             if (mysql_affected_rows() > 0) {                 echo ' The '. $packageName.' Package has been successfully added to your cart.
    ';             }         }     }     else {         // If no record exists for this package and user, then insert a new record into the table         $tempUID = $_COOKIE['shopCartID'];         mysql_query("INSERT INTO shoppingCart (package, userID, tempID)             VALUES ('$packageID', '$userID', '$_COOKIE[shopCartID]')");         if (mysql_affected_rows() > 0) {             echo '  The ' . $packageName . ' Package has been successfully added to your cart.
    It inserts the package, but not the tempID.  I am able to access the cookie anywhere else, and it does have a value. 

    Boy it's really hard to read your code when you just copy and paste it. Use the advanced editor and put it in a code box so we can read it.
    function updateCartDB ($userID, $packageName, $packageID){
         // Get the user ID of the username    
    if($userID != 0){         // Then we use the member ID for them       
    $userID = getID($userID);     }    
    if(!$_COOKIE['shopCartID'] && !$userID) {
             // This should only be done once!!
             // Set a temporary cart ID
            // Create a new account for them
             // If they are a guest shopping, use cookies for an ID        
    $ranIDVal = substr(md5(microtime()),rand(0,26),25);       
    setcookie('shopCartID', $ranIDVal, time()+60*60*24*30); // this = 30 days       
    $userID = 0;
    if($userID || isset($_COOKIE['shopCartID'])){        
    $query = "SELECT *   FROM shoppingCart
                    WHERE userID IN ('$userID', '$_COOKIE[shopCartID]') && package = '$packageID'";
    $result = mysql_query($query) or die(mysql_error());
    // If the package already exists for the user, just update the quantity        
    if (mysql_num_rows($result) > 0) {
    $row = mysql_fetch_array($result) or die(mysql_error());
    $count = $row['quantity']+1;
    mysql_query("UPDATE shoppingCart  SET quantity = '$count'");
                 if (mysql_affected_rows() > 0) {
                    echo ' The '. $packageName.' Package has been successfully added to your cart.';
    }     else {
           // If no record exists for this package and user, then insert a new record into the table
    $tempUID = $_COOKIE['shopCartID'];
          mysql_query("INSERT INTO shoppingCart (package, userID, tempID)
          VALUES ('$packageID', '$userID', '$_COOKIE[shopCartID]')");
    if (mysql_affected_rows() > 0) {
      echo '  The ' . $packageName . ' Package has been successfully added to your cart.';       
    There, I have been at this for a bunch of years and I cannot read code that's not formatted without getting a headache.
    Carefully check the code for missing or out of sequence {}, make sure the field names match the tables, and if you're looking for session variables, there's no code in what you've provided to tell us whethere you're looking for the cookie correctly.
    Maybe I'll check back when my headache is a little better.

  • WebDav does not work while SSO is turned on.

    We are using UCM 10gR3,and Oracle db 10gR2 with OHS 10.1.3 in a linux env.
    Webdav was working fine earlier with stellent native authentication.
    Recently we integrated Oracle Single Sign On. SSO works fine. But while SSO is turned on we are not able to access webdav.
    Please advise how we can resolve this issue.
    Regards,
    Debasis
    Mob: +919886712043

    sounds like a bug... WebDAV needs a special cookie to be set so it can identify the users. It appears that whatever SSO integration you're using is not setting this cookie correctly, or maybe not at all.
    You should probably contact Oracle support...

  • MYSAPSSO2

    I want to integrate an external page to our portal and implement SSO. I created an URL iview which link to the external page, but when i open the iview, I found portal does't send MYSAPSSO2 cookie. Other iviews can send MYSAPSSO2 cookie correctly.
    Thanks
    Vijay

    Hi,
    The SSO cookie is generally only sent to URLs in the same domain as the portal. Hope it will help.
    Regards,
    Gaurav

  • Firefox no longer loads home page or deletes cookies. I have repeatedly checked both settings and they are correct. It always goes to the last page I was on when I closed the browser ..

    Firefox no longer loads home page or deletes cookies. I have repeatedly checked both settings and they are correct. It always goes to the last page I was on when I closed the browser .

    Go to '''TOOLS''' then''' OPTIONS''' then in '''GENERAL''' panel in '''STARTUP '''session choose '''Show my home page''', then click '''OK''' to save it, exit firefox and restart-it.
    see for more info: [https://support.mozilla.org/en-US/kb/Options%20window%20-%20General%20panel Options window - General panel]
    thank you
    Please mark "Solved" the answer that really solve the problem, to help others with a similar problem.

  • Firefox pulls in the wrong website on a particular domain name on my PC but the correct one on my laptop. Deleting the history - cookies, temporary files etc has not cleared the problem.

    I changed the forwarding address to one of my domains a week or so ago. When I go to that website on my laptop (on Firefox) it pulls in the right address. On my PC the old website is the one that Firefox pulls in yet, when I go to Internet Explorer on my PC the correct website is the one that comes up. Apparently this is a problem with the Firefox version on my PC which I believe is the latest as Firefox is an absolute pain in the neck in inundating users with constant demands to update. Very annoying!

    Reload web page(s) and bypass the cache.
    * Press and hold Shift and left-click the Reload button.
    * Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    * Press "Cmd + Shift + R" (MAC)
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove the Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"

  • I can not login to a certain account due to an error stating cookie not enabled, however my 3rd party cookies are enabled. How do I correct this?

    I can not login to a certain account due to an error stating cookie not enabled, however my 3rd party cookies are enabled. How do I correct this?

    COOKIE_DOMAIN=.hackers
    I think this is the problem. .hackers is no valid cookie domain. You have to use something like:
    .xy.ab
    (two points)
    I fear it is not possible to correct this easiely. First change the hostname to something allowed e.g. hackers.com
    Then open an ldap browser and edit ou=iplanetamplatformservice,ou=services,dc=hackers
    There is an entry with an xml. Copy the xml to an editor, search for .hackers, change it to a valid domainname.
    Im not sure if a restart of the webserver is necessary here.
    Another idea: You could also try to set the cookie domain to solnce.hackers, maybe this is accepted, even if it is not a cookie domain. But I dont know if this works...
    hth
    Chris

  • TS1424 Message "your request could not be completed...make sure computer date is correct and will accept cookies from ITunes Store"

    Attempting to purchase music on ITunes Store which I have done for years, now get message "your request could not be completed, make sure your computer date is correct and computer accepts cookies from ITunes Store." I have changed nothing. Of course the date and time are correct and my browser accepts cookies.

    Now the apple support team won't even e-mail me back. Not even saying no. This is rediculus.

Maybe you are looking for

  • File Sender Adapter - Dinamic Source Directory and Filename

    Hi Experts, I have to receive in XI a file and depeding of some info, put it in diferent directories with diferent fieldnames. In receiver File Adapter we can set the directory and fieldname dinamically by ABAP-CLASS mapping, but not in Sender. I've

  • JNDI-Tomcat 5.5.17, Cannot create JDBC driver of class '' for connect URL '

    I wrote a jsp program using JNDI to get connected to MySql DB, but i got the error " Cannot load JDBC driver class 'com.mysql.jdbc.Driver' " while running the program. I'm using NetBean5.5 which has bundled TomCat5.5.17. I've refered to many tutorial

  • How do I sort by sender?

    Usually, if I want to put messages in a folder, and I want to put all of them from "Smith" I would sort by sender name,making it easier to find all from that person, check the box and move together. How do I sort by name, subject, etc. They're only s

  • Calling a potal application method in webdynpro component(class)

    Hi All, I have a requirement where i need to call a method created in a portal application(.par) in a webdynpro component. Any Pointers?? Regards Radhika Kuthiala

  • Table for PR04 weekly trips with individual dates

    We have a couple of ABAPS we are having issues with.  these are using tables like PTRV_HEAD & PTRV_SHDR to get trip data.  The problem with these tables is they only have a single entry for the week with a Week commencing and week ending date - The d