Frmrwinteg: how to set cookie domain dynamically

We are using the frmrwinteg bean for calling reports without sso with passing the userid info in an encrypted cookie. We have the following problem:
We have to pass 'servername.domain' as the cookie domain value, e.g. 'formsserver.company.com'. Although the manual states that just passing the domain (i.e. '.company.com') is enough, we did not manage to get this working.
Now we have a server that can be approached in two ways:
- Directly, using the server's hostname
- Through a reverse proxy (ibm webseal), using the proxy name.
We have configured both servername:port combinations as virtual hosts on the http server, so both connections work, but the cookiedomain must now be set depening on which way it is called.
The question is: can we determine within Forms (maybe using webutil?) what the original url was from where the form is started? In that case we can dynamically determine the correct value for the cookie domain.
Or is there a way to get the cookie working with just '.company.com' as the cookie domain?

I found some documentation why our cookie domain does not work. '.company.com' would work, but '.company.nl' (or any other country code) does NOT work. See explanation below:
However, you CAN use it accross different hosts on the same domain, provided the domain either:
1. ends with edu, net, gov, mil, com or org and contains at least 1 dot in it (eg you could specify xxxx.com, and use it on hosta.xxxx.com and hostb.xxxx.com) OR
2.) ends with a country code and contains 2 dots in it (eg you could specify xxxx.com.au and use it on hosta.xxxx.com.au and hostb.xxxx.com.au).
So it seems the servernames have to be extended with an extra level, e.g. 'hostname.servers.company.nl'.
I do not think my customer will ever want to do that.

Similar Messages

  • How to set cookie value in one page and retrieve in another page using setA

    How to set cookie value in one page and retrieve in another page using setActionListener?
    I have tried with following code srcpage.jspx->destpage.jspx
    srcpage.jspx
    <af:table value="#{bindings.DepartmentsView1.collectionModel}"
    var="emp" rows="#{bindings.EMPView1.rangeSize}"
    first="#{bindings.EMPView1.rangeStart}"
    emptyText="#{bindings.DepartmentsView1.viewable ? 'No rows yet.' : 'Access Denied.'}">
    <af:column sortProperty="EmployeeName" sortable="false"
    headerText="Cookie Testing">
    <af:commandLink text="#{emp.EmployeeName}" action="success">
    <af:setActionListener from="#{emp.EmployeeName}"
    to="#{cookie}"/>
    </af:commandLink>
    </af:column>
    </af:table>
    espage.jspx
    <af:outputText value="Test Cookie Value: #{cookie}"/>
    ,Here Test Cookie Value prints the following instead of its original String value
    {JSESSIONID=javax.servlet.http.Cookie@7da288, oracle.uix=javax.servlet.http.Cookie@399f62}
    I have passed employee name "Robert" to cookie in srcpage.jspx,but it prints "JSESSIONID....." instead of "Robert" in destpage.jspx
    Thanks in advance
    Kalee

    Hi,
    "cookie" is a reserved name. If you want to write to a session scope attribute called "cookie" then you have to call #{sessionScope.cookie}. If you want to use EL to set and read from cookies then you will have to use
    #{cookie.cookieName}
    Note that #{cookie} writes to and returns a map
    check this: http://www.informit.com/articles/article.aspx?p=30946&seqNum=7
    Frank

  • How to set cookie expire time

    Hi I'm new to jsp,
    please tell anybody, how to set cookie expire time.
    I know about setMaxAge(); but my requirement is set the expire time until close the browser or logout.
    And one more thing is how to delete cookies while logout.
    Thanks in advance
    achchayya.

    Hey,
    I understand what you are trying to say. solution is simple dont set setMaxAge , just create cookie and use it. It will be valid till you close the browser.
    Regards,
    SRI

  • Not able to set cookie domain ???

    Hi All,
    I am not able to set cookie domain in my webapp(WebApp.mydomain.com).
    My sample code is given below, my webapp name is WebApp.mydomain.com, this has got two jsp pages, one for creating cookie and other one is for reading the cookie.
    CreateCookie.jsp
        Cookie cookie = new Cookie("id","123");
              cookie.setDomain(".mydomain.com");
              cookie.setPath("/");
              response.addCookie(cookie);ReadCookie.jsp
    Cookie[]cks = request.getCookies();
              for(int i=0;i<cks.length;i++){
           out.print("cookie found.............................   "+cks.getValue());
    Issues:
    1. I am not able to read the cookie, if i set the domain as cookie.setDomain(".mydomain.com"); at cookie. I verified it by commenting the domain setting line.
    2. The reason for setting the domain is, I have another web application "WebApp1.mydomain.com" which is supposed to read this cookie which is created in "WebApp.mydomain.com" application.
    3. Is it possible to access the cookie across the applications as the cookie domain and path are been set. (i.e) From WebApp.mydomain.com to WebApp1.mydomain.com?Please share your inputs :(
    Thanks,
    Sundar

    Hi All,
    Any comment/solutions on this???
    Regards,
    Sundar

  • How to set the domain of a cookie in localhost environment

    in some scenario i have to set the domain of cookie on my local environment,
    how can be done?????????????
    i.e http://localhost:7001/myapp/testservlet
    how to set the cookie domain for "myapp"

    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

  • How to set up domain mail forwarding

    Greeting gurus.
    I am a BT Business Broadband custome and BT also host my domain.
    I am terminating my Boradband service next week but the domain is not for renewal until 2012.
    I have trying to find how to set  up mail forwarding for the domain.
    I would like all mail addressed to [email protected] -> [email protected]
    Replies can then be sent from the appropriate domain.
    The reason is that mydomain.com is effectively being mothballed, but I wish to ensure that any mail does not just get lost.
    I am on the support line but wanted to know if anyone can help me quicker.
    thanks.
    ps: this is my first post so be gentle with me!

    The business forums would be a better place for this.
    http://business.forums.bt.com/
    I've not hosted a domain with BT, but all the other domain registration/hosting companies I've used have a browser based control panel where these things are configured.
    You say the domain is being mothballed. You'll have to continue with the registration though, and BT claim to offer email with all domain registrations, so why not just carry on as you are ?

  • Setting cookie domain

    I need to set a cookie for the selected index of a webform, so it can carry across multiple posts and keep the state (in other words if they select option1, and submit, then option1 is still selected on the form again, etc.)
    this is the script i'm using to set the cookie:
    function get_selected_state(){
                   var selected_state = $('select[id="CAT_Custom_414023"] option:selected').val();
                   setCookie('selected_state', selected_state, '/', '.domain.businesscatalyst.com');     
              function setCookie(c_name,value,path,domain,exdays){
                   var exdate=new Date();
                   exdate.setDate(exdate.getDate() + exdays);
                   var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()+";path="+path+";domain");
                   document.cookie=c_name + "=" + c_value;
              function getCookie(c_name){
                   var i,x,y,ARRcookies=document.cookie.split(";");
                   for (i=0;i<ARRcookies.length;i++){
                        x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
                        y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
                        x=x.replace(/^\s+|\s+$/g,"");
                        if (x==c_name){
                             return unescape(y);
              // if the cookie for state selection exists, set the form to it
              if(c = getCookie('selected_state')){
                   $('option[value="'+c+'"]').attr('selected', 'selected');
              // set the cookie to the current selection
              get_selected_state();
              // and update it on reselection
              $('select[id="CAT_Custom_414023"]').on('change', function(){
                   get_selected_state();
    I've been checking it on the client site with greasemonkey and it works fine, but it doesn't work on the server. I figured the problem was the domain but I don't seem to be able to set the domain to match properly. What am I doing wrong here?

    You got a dot at the start of your cookie domain. Should not be there. Should be just domain.businesscatalyst.com and then the live domain when live. The cookie of course wont work through worldsecuresystems as a side note.

  • Can u tell me how to set cookie version

    I want to know is there any cookie version? If yes how to set from a JSP/Servlet program

    Cookie cookie = new Cookie("name","value");
    cookie.setVersion(1);
    will set the version of this cookie to 1

  • How to set log filename dynamically

    Hi all!
    Could anybody give me a hint how I can set file name for log4j dynamically.
    I have a log4j.properties file:
    log4j.rootCategory=debug, stdout, R
    #### First appender writes to console
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    # Pattern to output the caller's file name and line number.
    log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %-6p [%c{1}] %m%n
    #### Second appender writes to a file
    log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
    log4j.appender.R.DatePattern='.'yyyy-MM-dd
    log4j.appender.R.File=Myfilename.log
    log4j.appender.R.MaxFileSize=10000KB
    log4j.appender.R.MaxBackupIndex=1
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.layout.ConversionPattern=%d{ABSOLUTE} %-6p [%c{1}] %m%nand following code in my class:
    Logger LOGGER = Logger.getLogger(MyClass.class);
    File logFile = new File("newFilename.log");
                logFile.createNewFile();
                FileAppender r = (FileAppender)LOGGER.getAppender("R");
                r.setFile(logFile.getAbsolutePath());
                r.activateOptions();Unfortunately it does not work as r is NULL.
    It throws java.lang.NullPointerException.
    Could anybody help me?

    I wouldn't try to mess with the file name. I'd use logging the way it is intended - with the correct log file name configured.
    Even if you successfully do that, what do you suppose will happen when the log "rolls over"? Do you expect it to honor the fact that you've changed the base file name? I would expect it is going to fail when it closes the log, renames it using the rolling pattern, and creates a new log.

  • In chart (graph), How to set scale value dynamically(user input scale val.)

    Hi ,
    I am using Crystal Reports XI R2.
    I have specified scale value but user is asking he can decide scale value while running the chart like Y-axis major interval (inclement by) 10, 7, 4, .5, .25 etc.
    How to achieve this please give me suggestions.
    Thanks and regards,
    Manjunath N. Jogin

    I do not think this can be done dynamically,   You could build several sections, each with it's own graph,
    set the scales in each graph, in its section, and then supress sections based on parameter.
    So, you could have one section that is  5,10,15,20  etc.
    and another that is 8, 12, 16, 20  
    depending on what they want.

  • How to Set cookie in AIR with HTML/Javascript

    Can someone explain or post example code as to how I can go
    about setting a cookie in AIR using HTML and Javascript?
    I have an AIR app that requires the user to login on a form
    that lives in a non-applicationSandbox. I know how to
    create/modified/delete cookies using JS and a web browser, but the
    same code returns a cookie with a null value. I'm sure I'm just
    missing one line/word of code to make this happen.
    The stripped down basics of setting and reading a cookie
    using Javascript:
    document.cookie("myCookie = yummy");
    var taste = document.cookie;
    What am I doing wrong?

    quote:
    Originally posted by:
    anirudhs
    > So if I want to use cookies in AIR html/javascript the
    end user will need to have http access, whether it be from a public
    or private server?
    Yes.
    Though I am curious to why you are using cookies to store
    state on the client? This is AIR and you have access to the
    filesystem, local SQLite DB, encrypted local store, etc.
    Thanks for your previous answer anirudhs. Finally got a
    cookie thru Air! :P
    Some scenario's do require login via cookies for our webapps
    (in my case, chat w/ nicks which also logs users by serverside js +
    php, thereby allowing the same access method for web-browser login
    to the same chat rooms). It might be a bit of a stretch for some of
    us to attempt to code filesystem/SQlite/localStore updater for our
    web-users via js + php, although I know we could perhaps embed a
    hidden flash to do the localStore, and pass data back and forth
    from js, but that's lot of extra lifting, whereas browser cookies
    are naturally designed for such logins.
    I'm confused by the safari wording thou.. does the webkit
    security model in Air only work via user activated http (ie.
    clicking links), or is there some way Air can initiate an http
    connection (say using loader) to set or get cookies? It seems a
    pain to need to force the Air user to click and open a dead link
    just to activate a cookie session, even if it's only to a hidden
    frame.

  • How to set hostname using dynamic binding for FTP, AQ, SMTP adaptersin BPEL

    I am using Oracle BPEL and SOA 11g and my requirement is to send files and messages to different destinations ( hostname ) using dynamic JCA bindings. All hostname to be used other related information for destination is stored in database. My BPEL flow should retrieves the hostnames using one webservice and then set the hostname in FTP, AQ and SMTP adapters using dynamic JCA bindings.
    I came across http://rahullahiri.blogspot.in/2011/09/configuring-ftp-adapters-in-oracle-soa.html and http://www.soabyte.com/2010/11/jca-dynamic-partnerlinks-in-soa-11g.html but unsure if we can dynamically set the hostname also for the adapters mentioned in the BPEL flow.
    Can you please advice how it can be achieved in BPEL and what is the best way?
    Thanks for help in advance.
    Shail

    Hi,
    Its good that u pasted the complete log file. In your environment you have to run this upgrade tool only once from any of the middle tier.
    And with respect to your error that u got in precheck is quite simple. All u have to do is just run this script from by connecting to portal schema using sqlplus.
    Run dropupg.sql
    Location-------- /raid/product/OraHome_1/upgrade/temp/portal/prechktmp/dropupg.sql
    Later you re-run the upgrade tool and let me know the status.
    Good luck
    Tanmai

  • How to set column heading dynamically?

    Hi:
    How can I set a column heading dynamically -by PL/SQL code- ?
    Regards,

    Hi,
    Create a formula field, and return desired heading depending on your conditions, and use that field as the column header.
    Regards,
    Manu.

  • How to set event handler dynamically?

    Hi all,
    Usually, we add event listener like this:
    myCanvas.addEventListener("click", onClick)
    How can I set the second parameter so that I can add click handler dynamically?
    For example, I have functions clickHandler1, clickHandler2, ...
    And another variable fname: String will contains value1, value2, ...
    Thanks and regards,

    You could do something like this:
    public function firstFunction():void
         trace("First Function");
    public function secondFunction():void
         trace("Second Function");
    public function callFunctionByName(name:String):void
         this[name]();
    public function addEventHandlerByName(handlerName:String):void
         this.addEventListener(Event.ENTER_FRAME, this[handlerName]);
    this.callFunctionByName("firstFunction"); //traces 'First Function'
    this.callFunctionByName("secondFunction"); //traces 'Second Function'
    Let me know if that works for you.

  • How to set target Url dynamically in submit button

    hi,
    I am using livecycle process to render a pdf form. The form has a submit button. Is it possible to set URL of submit button dynamically in a form? If yes how can i pass the target URL from process, dynamically while rendering the form? Can someone help me in this.
    Thanks,
    kripa

    Hi,
    Go to Tools > Embedded OC4J Server Preferences... > Global > Startup.
    Look for the options in "Host Name or IP Address Used to Refer to Embedded OC4J".
    William

Maybe you are looking for

  • How do I configure rediffmail account to my iPad 2?

    I have purchased an iPad 2 recently and want to configure my rediffmail account on it, have tried putting pop details but could not configure the same, any assistance?

  • Photoshop CS6 printing with Mac OS 10.10.2

    I recently attempted to print a 13x19 photo on a Canon PIXMA 9500MarkII color printer using CS6.  The printer driver continually reported an paper since error.  Eventually, I gave up and tried to print the same photo with Apple's Preview application

  • Changes to Normal.dotm in Word 2007

    Hello, I have created a new "Blank Template.dotm" which essentially is a blank document that prompts users to enter in document properties, etc. The template works fine in Word 2007 (Office 2007 SP3). The requirement is to make this document the norm

  • 2 finger swipe for Notifications pane?

    Is it possible to configure this action for Magic Mouse?  This is how I view the pane with my MBP's trackpad.

  • Forms tab canvases

    Hi, Does anyone know how can I set the colour of the background and foreground on the heading of each tab page? Wright now,I'm setting the tab page visual attribute,but Forms is showing some others colours on the tab pages headings. I'm using forms 9