Automatically working out the domain for a cookie

Hi all
          We have a couple of web sites that we want to share cookies between
          we have one site www.mysite.com and another, registration.mysite.com
          If, when I add a cookie and hardcode the domain to '.mysite.com' everything
          works fine. However I would like to dynamically work out the domain because
          we deploy our sites within a number of countries and i dont want to hardcode
          the domain name (eg uk would be www.mysite.co.uk, so the domain would be
          .mysite.co.uk )
          If someone enters www.mysite.com/request.jsp i want to be able to extract
          .mysite.com out of the url and specify it as the domain when adding cookies.
          Does anyone know of any servlet related methods that can get the url that
          was requested - including the server name?
          request.getServerName() wont work because it returns the machine name (ie
          the name of your machine within a network). request.getRequestUrl() also
          wont work for the same reason.
          If anyone knows how i would extract the url the user typed in then that
          would be great
          Thanks
          matt
          

Hi
After Some googling I could find out this for you. I think it is a bug with IE.
http://www.webmasterworld.com/forum21/11530.htm
The idea is to use a virutal host.
HTH
VJ

Similar Messages

  • SQL query to work out the folder for backups.

    Hi All,
    I am looking for a SQL script that will check the backup history and then inform me of the folders where the backups are written to.
    I have found that the default backup location cannot be relied upon as it may well be the default location, but it doesnt mean that all backups will be found there.
    Thanks in advance.

    Pls try the script bellow
    SELECT msdb.dbo.backupset.database_name,msdb.dbo.backupset.backup_start_date,msdb.dbo.backupset.backup_finish_date,
    msdb.dbo.backupset.expiration_date,
    CASE msdb..backupset.type
    WHEN 'D' THEN 'Database'
    WHEN 'L' THEN 'Log'
    WHEN 'I' THEN 'Differential'
    END AS
    backup_type,msdb.dbo.backupset.backup_size,msdb.dbo.backupmediafamily.logical_device_name,
    msdb.dbo.backupmediafamily.physical_device_name,msdb.dbo.backupset.name ASbackupset_name,
    msdb.dbo.backupset.description
    FROM msdb.dbo.backupmediafamily
    INNER JOIN msdb.dbo.backupset ON msdb.dbo.backupmediafamily.media_set_id =
    msdb.dbo.backupset.media_set_id
    WHERE (CONVERT(datetime, msdb.dbo.backupset.backup_start_date,102) >=GETDATE()- 7)
    ORDER BY
    msdb.dbo.backupset.database_name,msdb.dbo.backupset.backup_finish_date desc
    vt
    Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker

  • [svn:bz-trunk] 20680: Tomcat 7 Login Module work, due to the Tomcat 7 Security framework change we need to work out the security integration piece for tomcat 7 .

    Revision: 20680
    Revision: 20680
    Author:   [email protected]
    Date:     2011-03-08 08:23:30 -0800 (Tue, 08 Mar 2011)
    Log Message:
    Tomcat 7 Login Module work, due to the Tomcat 7 Security framework change we need to work out the security integration piece for tomcat 7. So far the ValveBase and tomcat Realm had API changes which will impact on the Login integration with Tomcat 7
    Modified Paths:
        blazeds/trunk/modules/opt/build.xml
    Added Paths:
        blazeds/trunk/modules/opt/lib/catalina-708.jar
        blazeds/trunk/modules/opt/src/tomcat/flex/messaging/security/TomcatValve708.java

    Revision: 20680
    Revision: 20680
    Author:   [email protected]
    Date:     2011-03-08 08:23:30 -0800 (Tue, 08 Mar 2011)
    Log Message:
    Tomcat 7 Login Module work, due to the Tomcat 7 Security framework change we need to work out the security integration piece for tomcat 7. So far the ValveBase and tomcat Realm had API changes which will impact on the Login integration with Tomcat 7
    Modified Paths:
        blazeds/trunk/modules/opt/build.xml
    Added Paths:
        blazeds/trunk/modules/opt/lib/catalina-708.jar
        blazeds/trunk/modules/opt/src/tomcat/flex/messaging/security/TomcatValve708.java

  • How do you work out the number of days difference between two dates?

    I'm running Crystal v12.
    We use a date field in our SQL database that we use to store the client's year end date.
    As the year end date (date and month) doesn't change for a client, the year end date field in all of our reports is set to just show the DD/MM part. Over the years as new clients are set up we just enter the date and month - the year part is irrelevant although as in all date fields the year is automatically entered.
    Doing it this way means that we don't have to adjust the year end year part each year. We just use the DD/MM part.
    I need to create a formula that works out the number of days there have been (i.e. the difference) from the current date to the year end date. It MUST EXCLUDE the year however.
    For example:
    Year End Date = 30/04/03
    Current Date = 25/05/10
    Days Difference (EXCLUDING year) = 25
    Days Difference (including year) = 2582
    Year End Date = 31/03/09
    Current Date = 25/05/09
    Days Difference (EXCLUDING year) = 55
    Days Difference (including year) = 420
    If you include the year part then working out day difference is simply a case of creating a formula that subtracts the year end date from the current date (CurrentDate - {tblClient.YearEnd}.
    HOWEVER I need to exclude the year part.
    Can anyone tell me the formula or best way to do this?
    Thanks in advance.
    Edited by: BadBoy House on May 25, 2010 3:15 PM
    Edited by: BadBoy House on May 25, 2010 3:15 PM

    Hi
    You can try this
    datevar e := date(year(currentdate),month({tblClient.YearEnd}),day({tblClient.YearEnd}));
    numbervar num_days := datediff("d",currentdate,e)
    Create a datevar called e that uses the original month and day numbers for {tblClient.YearEnd} but uses the year of the current date
    Then just datediff on e to get the number of days between the two dates
    I hope i understand your problem and that this helps
    Best regards
    Patrick

  • I just installed Lion OSX. Where can one find the "domain" for iWeb?

    With Snow Leopard one could find the "domain" for one's iWeb in Admin+Library+application support+iWeb. When one changed computers, one simply had to save this domain and then put it in the right place in the new computer. Things have changed with Lion OSX - and I can't find the "domain" for my web site.
    Anyone know where to look (Scripts?)
    Thanks,
    T...

    The reason Apple has hidden the User/Library folder is that there is not longer any reason to get into it what with iWeb (and iDVD) being discontinued and no longer supported. 
    We now know iWeb, and iDVD, have been discontinued by Apple. This is evidenced by the fact that new Macs are shipping with iLife 11 installed but without iWeb and iDVD.
    On June 30, 2012 MobileMe will be shutdown. However, iWeb will still continue to work but without the following:
    Features No Longer Available Once MobileMe is Discontinued:
    ◼ Password protection
    ◼ Blog and photo comments
    ◼ Blog search
    ◼ Hit counter
    ◼ MobileMe Gallery
    All of these features can be replaced with 3rd party options.
    If a site is published  to a folder on the hard drive and then uploaded with a 3rd party FTP client to an ftp server subscriptions to slideshows and the RSS feed will be broken.  If published directly from iWeb to the FPT server those two features continued to work correctly.
    There's another problem and that's with iWeb's popup slideshows.  Once the MMe servers are no longer online the popup slideshow buttons will not display their images.
    Click to view full size
    Roddy McKay and I have figured out a way to modify existing sites with those slideshows and iWeb itself so that those images will display as expected once MobileMe servers are gone.  How to is described in this tutorial: #26 - How to Modify iWeb So Popup Slideshows Will Work After MobileMe is Discontinued.
    The iLife suite of applications offered on disc is now a discontinued product and the remaining supported iApps will only be available thru the App Store from now on. However, the iLife 11 boxed version that is still available at the online Apple Store (Store button at the top of the page) and those still on the shelves of retailers will include iWeb and iDVD.
    This may be of some interest to you: Life After MobileMe.
    OT

  • When working in the basement for an extended period I get SOS message and have to turn my phone off and on before I can use it is this normal

    When working in the basement for an extended period I get SOS message and have to turn my phone off and on before I can use it is this normal

    when the phone detects the Optus network, this will automatically go out of the SOS mode.
    The SOS mode allows you to call SOS numbers like 911 or 112 even if there is no network coverage.
    What it does it tap to the next available carrier (regardless if this is your home carrier or not) to have the emergency call pushed through)

  • Pl find out the reason for VC Cycle error for vendor 105191

    I had checked entire cycle of  Valuation Class(MM42),  Tax Code(ME12), validity period, MC Code
    in the contract as per the proforma invoice 12738 for vendor 105191  -  VC Parties, found ok.
    Pl find out the reason for VC Cycle error for vendor 105191
    " Unable to create consignment commision - FI/CO"
    " Interface : inconsistent FI/CO line item data"

    I've used the CS6 AUTOMATE|PHOTOMERGE command many times.  Today I ended up with the Error 22 message.  After reading your message I did a search on my Win7 Pro 64 bit machine and got a number of hits for "scriptingsupport.8li". 
    1 for CS6 (on my machine)
    2 for CS5 (no longer on my machine)
    2 for Elements 8 (no longer on my machine but I DO have Elements 10 & 11 on it)
    2 for CS# (no longer on my machine)
    QUESTION:  Should I delete some of these and which?  Will deletion(s) suffice?

  • Designing a banner stand: Is there a easy way to work out the recommend margins / bleed?

    So its my first time creating a banner stand and something of larger scale. I was wondering if there is a certain way to work out the recommended margins for the size of the document? Or should i simply do it by eye. The banner dimensions our 800m x 1200mm.
    Also any other tips for creating larger document would be appreciated.

    It sounds like the same product that we do a lot of here. There's no technical reasons for a particular margin, as they can be full bleed (print right to the edge), so it's a subjective design decision.Take into consideration the content and the context. It could be a something with little content, intended to draw people from a distance (larger margins), or it could be something with a lot of content that will be read from a short distance (smaller margins).
    I tend to do these as 1:1 scale, but bear in mind that InDesign's Optical Kerning will be too tight when you do this.

  • How to find out the URL for OAM at a new site

    Hi
    if you turn up at a new site, and you only have the oracle / applmgr account password
    to a linux server, how would you go about finding out the URL for OAM ?
    Many thanks

    OAM URL is:
    http://hostname.domain:port/servlets/weboam/oam/oamLogin

  • I filled out the form for Mountain Lion upgrade in the morning and expected to get the codes... It is 10 pm and no codes. Is it normal?

    I filled out the form for Mountain Lion upgrade in the morning and expected to get the codes... It is 10 pm and no codes. Is it normal?

    If it was the contact form for the forum mod team then it is normally about 3 working days as all mails are dealt with strictly in turn also if it was that form you would have had a confirmation immediately you sent the contact form as it opens a new web page with a reference number on it and also you will be personally contacted by phone or email
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

  • Working out available power for phones

    Hi,
    Is there some sort of rule of thumb to follow when working out how many phones you will be able to power on a switch? e.g If I have a stack of  4 x 3750X how do you work out available power for phones? Does it make a difference if the switches run dual PSU etc.. and is there a drop in the available power if a switch loses it's main power and depends on STACK power etc..
    Any further info would be appreciated.
    Thanks

    Hi Brandon,
    It was more of how to work out how much power I'd have available before I bought the switches, e.g If I was to buy 5 x 3750x POE, how much POE would be available.
    I know how to view the available power on currently owned switches. It was really just to try and work out what I'd have "IF" I purchase this and that. This would then steer me in the direction of what I should buy if I have for example 300 7940G phones for example and 7 APs.
    Thanks

  • How to find out the reason for blocking locks?

    PB Application try to create data in ASE 12.5. With this operation, there are sql, sp, trigger involved. Most of the it is okay. With lock of sleeping or sync sleeping lock. User wait for a short time to get the result.
    but some time, there are blocking lock.
    If spid for the app is 1. then looks like this app also generate another spid, say it is 2. and 2 is blocking by 1. spid 1 holding lock!
    then all user is frozen because of spid 1 holding lock!!!  How to figure it out the reason for blocking locks?

    Thanks, Mark. Yes, sp_lock, sp_who, ... are common tool I used.
    I found out one case like:
    I have a SP which call a View for data.
    When I run this SP, suppose the sipd is 1. then it will create another spid 2 because of access view and it gone very quick. This cause spid 1 block spid 2 within a short time.
    If the are many user run the app, the app will be  frozen and everyone is waiting. Finally it release, no dead lock, but the performance is not acceptable.
    That why I have this question.

  • How to find out the Tcodes for the exits

    Hi All,
    how to find out the Tcodes for the exits. i have a list of exits (customer, user, badi ). i need to find out what are the Tcode affected by this exits.
    Customer Exits: EXIT_RFEBBU10_001
                              EXIT_RFEKA400_001
                              EXIT_RFFOEXIT_100
    User-Exits:  USEREXIT_DELETE_DOCUMENT
                       USEREXIT_FIELD_MODIFICATION
                       USEREXIT_MOVE_FIELD_TO_VBAK
                       USEREXIT_PRICING_PREPARE_TKOMP
    BADI: CUSTOMER_ADD_DATA_CS
              HISTORICAL_VALUES
              MD_ADD_ELEMENTS
              MD_CHANGE_MRP_DATA
              MD_PIR_FLEX_CONS
              MD_PLDORD_POST
              ME_REQ_POSTED
              NOTIF_EVENT_SAVE
    Can anyone help on this <urgency factor removed>.
    Regards
    Ksihore
    Edited by: Suhas Saha on Feb 20, 2012 12:58 PM

    i have just started reading about all these-user exits ,customer exits etc.
    i have read somewhere that:call to customer exits are triggered by function modules exits.
    the structure of function modules are like this:
    EXIT_RFEBBU10_001
    MEANS
    Keyword EXIT followed by program name fllowed by three digits.
    and the call is like this:
    call customer function 0001.
    From above we can conclude that this customer exit must be used in program RFEBBU10.
    GOTO SE38 andenter prog name RFEBBU10.check for above function module.
    for the rest i stick to the same method for user exits and BADI that we can findthe corresponding TCODES
    using Where used lists.
    please Tell me if i m wrong!

  • How to find out the infoProvider for a given dimension table?

    Experts:
    In RSA1, I want to find out the infoProvider for a given dimension table.
    But I am not sure how to display the tables linked to a given infoProvider.
    Could you provide a way to display all tables linked to a given infoProvider?
    Thanks a lot!

    See, The dimension table starts with Dcubename1 and incremental Dcubename2 .... so on
    Ex.ZSD_C01 is your cube name
    Dim tables starts for this is /BIC/DZSD_C011 /BIC/DZSD_C012 ...
    Goto - LISTSCHEMA  - derive cube name from given dim table and enter cube name  - execute - will show you all the tables

  • How to find out the description for the given field?

    Hi All,
    How to find out the description for the given field?
    I mean ETTYP  Desription is VTEXT. This we can find in TVEPT  Table. So, How canwe find this?
    Thanks in Advance
    Sri...

    Hi  Avi,
    If i want to disply the  fields like   AUART and 'Description of AUART',
    Suppose based on my query i will take AUART from T184 table. And the description of AUART is available in TVAKT table.
    my question is if i have given T184-AUART  and how do u find out AUART Description ?(How do u know which table is having Description of AUART)?
    Thanks in Advance
    Sri...

Maybe you are looking for

  • FM execution through xi

    Hi Everbody, Am using the FM "BAPI_DOCUMENT_CHECKIN2" to checkin the file in to DMS system. Backend Systen ERP is configured with DMS system , When FM of above is executed from backendsystem file gets attached. But Scenario gets different when i use

  • My iphone is causing tingling in fingers and up arm

    Hi, all.  When I use my iPhone 4 I am getting electrical shocks that begin in my fingers and go up my arm...depending on how long I use the phone.  I tried it with the adapter plugged in and without the adapter.  It does it both ways.  It does it whe

  • I'm trying to turn off the "Handoff" feature. When I go to "settings and then general" I do not have the option to turn off "Hand Off".  Help Please

    Can't seem to make this work.  I am up to date with my updates on both I-Phone and I-Pad.  The "Hand-off" feature is working, and I don't want it.  How do I turn it off?  I don't have the option to do that when I go to General & Settings.  Is it loca

  • Inserting a page from another website?

    i am a dreawaever novice! i have to make this a website and a video, i found a great java tour http://www.pan3sixty.co.uk/tours/uoh/java-map.htm i want to put it into my web page so it plays. can i do this? another thing! I have tried to a swf video

  • SIngle query for table Update

    In a procedure I have a CURSOR FOR_LOOP   FOR CUR_CONTO in      (SELECT TO_NUMBER(lpad(nvl(ltrim(K_DRG),'0'),3,'0')   ) K_DRG,          CASE         WHEN K_MDC  = 'NA' THEN 0          WHEN K_MDC <> 'NA' THEN TO_NUMBER( lpad(nvl(ltrim(K_MDC),'0'),2,'0