Why cannot I set Cookie on OAS?

I'm using Jdeveloper3.0 and OAS4.0.8,and I make a Servlet to set cookie.The program runs perfectly in Jdeveloper,but failed on OAS.The codes are as below:
Servlet1:
Cookie cook=new Cookie("TestCookie","test");
response.addCookie(cook);
response.setContentType("text/html");
Servlet2:
Cookie[] cooks=request.getCookies();
And cooks get null.However,if I use request.getHeader("Cookie"),I can get a String which contains "TestCookie=test".
Would someone please help me?Thanks a lot.

Sill question, but have you made sure that the path structure you are using matches the package structure for your application?
Copying HelloWorld.class into "Folder" should not work unless the base directory is also set to "Folder". (I say this because you've indicated that the two HelloWorlds" are the same). Remember that the full name of your initial class is <package>.<className>. If this doesn't match your initclass setting then the VM will be unable to load your class.
In general there is no particular reason why your initial class has to be at the root of the DMCC, although it is possible that the devive you are using to play out your AIT has some additional restrictions about what can be done.
Roger

Similar Messages

  • Why cannot I set value "base_directory"  for AIT?

    Hi,
    I am trying to insert MHP app into a ts and then try to recieve it on stb.
    I have a simple Xlet named HelloWorld including only one file HelloWorld.class . This xlet will display a string "Hello" on screen.
    Suppose that my xlet is stored in file system as the following:
    Test
    |----- HelloWorld.class
    |----- Folder
    |------- HelloWorld.class
    2 HelloWorlds are the same; and the whole file system will be broadcast in DSMCC OC.
    If i generate AIT including the first xlet (of Test directory) with:
    base_directory : /
    initclass: HelloWorld
    Result : GOOD, stb can run HelloWorld xlet
    If i generate AIT including the second xlet (of Folder subdirectory) with:
    base_directory: /
    initclass: Folder.HelloWorld
    or:
    base_directory: Folder
    initclass: HelloWorld
    Result: stb cannot run this Xlet.
    (I sure that the whole file system is broadcast .)
    So i think that stb just load and run xlets in root directory???
    I donnot know what causes the error ?
    How can stb load and run xlets in subdirectory?
    Thanks in advance
    Nghia.

    Sill question, but have you made sure that the path structure you are using matches the package structure for your application?
    Copying HelloWorld.class into "Folder" should not work unless the base directory is also set to "Folder". (I say this because you've indicated that the two HelloWorlds" are the same). Remember that the full name of your initial class is <package>.<className>. If this doesn't match your initclass setting then the VM will be unable to load your class.
    In general there is no particular reason why your initial class has to be at the root of the DMCC, although it is possible that the devive you are using to play out your AIT has some additional restrictions about what can be done.
    Roger

  • Cannot Change Set-Cookie in httpheader using setRequestRroperty()

    I am trying to update the cookie value sent in the httpheader using HttpURLConnection and setRequestProperty(), but the changes does not reflect. I just cannot add or modify any value in the httpheader
    Can any one suggest the reason.

    Post Author: sharonmtowler
    CA Forum: Data Connectivity and SQL
    if it uses a stored procedure, it may be hardcoded in the dataset.
    you can export the report in crystal to a report definition select application and you can see where all your hidden items etc are.

  • I cannot to set family sharing for my family. When i open to iCloud section in settings it says "There's no family information". Why ?

    As I said in subject I cannot to set family sharing for my family. When i open to iCloud section in settings it says "There's no family information". Why ?

    Yes, to clarify - we get a message that says "(he) is already a member of the Family"... but on my iPhone, it still shows that he is not, ie. that the invitation is still pending acceptance.
    A bit more detail - when I enter his name (or even .me email address) at the 'Add Family Member' screen on the iPhone, the system will not accept it. ie. I enter his credentials, hit 'Next', and it does not progress to the next screen...
    Bizzare. And he's the one who really needs to be enrolled, not so much my wife - who is successfully signed up!
    Hope there's some solution to this...
    Help Apple!!!!

  • Why does my iPad tell me my airport network "cannot be set up by this software"

    why does my iPad tell me my airport network "cannot be set up by this software"?

    You likely have an older version of the AirPort router which is not supported by AirPort Utility for the iPad.
    Check the model number on the bottom....if you have an AirPort Extreme.....or check the model number on the side of the device......if you have an AirPort Express.
    Post back with that model number.

  • IE not set cookie for downloaded js file.Why?

    I'm trying to  download a js file from a different domain  like main page  is from  www.abc.com but js file is from www.def.com. www.def.com sets a cookie . All major browsers get the cookie and sends it in the other requests to www.def.com.But
    IE sends this cookie to www.abc.com. Cookie has also domain field set www.def.com. Any possible solution?

    How, specifically, is the cookie set?
    When you use document.cookie to set a cookie, ALL BROWSERS set the cookie in the domain in which the script runs (e.g. the page that includes it). NO BROWSERS set the cookie in the domain from which the script downloaded.
    When you use a SET-COOKIE response header to set a cookie, MOST browsers set the cookie in the domain from which the download occurs. Internet Explorer will IGNORE that cookie (not setting it anywhere) unless a P3P statement is supplied. See
    http://blogs.msdn.com/b/ieinternals/archive/2013/09/17/simple-introduction-to-p3p-cookie-blocking-frame.aspx

  • How to  get rid of "Content-type: text/html; charset=UTF-8 Set-Cookie..." ?

    Hi
    I have several applications and I am working on making some kind of APEX "SSO".
    An user is authentified in one application. Then he may go to another application. The cookie has the same name from one application to another. The session ID is preserved from one application to another : i use this kind of URL : "f?p=109:1:&SESSION.:"
    I have seen that I need to authentify automatically the user when he swap to another application. For that i have a process in the welcome page that authentify the user, using the :app_user and the password, a PL/SQL after header:
    wwv_flow_custom_auth_std.login(
        P_UNAME       => :APP_USER,
        P_PASSWORD    => :P1_PASSWORD,
        P_SESSION_ID  => v('APP_SESSION'),
        P_FLOW_PAGE   => :APP_ID||':1'
        );So far so good. User is authenticated. The problem I face is that this message appears :
    Content-type: text/html; charset=UTF-8 Set-Cookie: TELEGESTION_AUTH=-1; path=/; Location: /pls/apex/f?p=109:1How to get rid of this message ?
    Thank you for your kind help !
    Christian
    PS: My question has not been answered... I hope somebody could help me on this topic.
    Edited by: Christian from France on Mar 4, 2010 2:02 AM

    Hi
    Have you tried using "f?p=109:1:&APP_SESSION.:" instead of "f?p=109:1:&SESSION.:".
    I don't see why you need to reauthenticate if they're in the same workspace?
    Cheers
    Ben

  • Why cannot I use hidden or display only item to store value for insert?

    hi, Gurus:
    I have a question:
    I implemented a form with report region in a page, the update works OK, but the add function has a problem:
    There is a column, offender_ID, which is a foreign key for another table, it should not be null during insert. However, even I pass the offender ID from master page when user click the create button, and it did shows in the form, it must be a text filed to insert successfully, why cannot I use hidden or display only item to store this value for insert? (If I use hidden or display only item, insert won't be successful, apex reports I tried to insert a null value to offender_ID column.)
    Many Thanks in advance.
    Sam

    Hi,
    There is a column, offender_ID, which is a foreign key for another table, it should not be null during insert. However, even I pass the offender ID from master page when user click the create button, and it did shows in the form, it must be a text filed to insert successfully, why cannot I use hidden or display only item to store this value for insert? (If I use hidden or display only item, insert won't be successful, apex reports I tried to insert a null value to offender_ID column.)I think both hidden and display items have attributes that can cause problems because of different ways these items function than non-hidden and non-display-only items function. Display Only items have a "Setting" of "Save Session State" Yes/No? That can be a problem.
    Would you do this? Make these items regular items instead and see if you can get those working. Then, we will try to change the fields back to hidden or display only.
    Howard
    Congratulations. Glad you found the solution.
    Edited by: Howard (... in Training) on Apr 11, 2013 10:26 AM

  • Question about setting cookies and custom authentication

    I have a question about setting cookies.
    I have two different 'projects' in HTMLDB - we will call them App1 and App2.
    I also have two different connection configurations setup in the DADs.conf file. - we will call them Connect1 and Connect2.
    App1 is setup to use database authentication (no user is specified in the DAD) and uses Connect1. Once the user successfully logs in, we set a username cookie (this is a persistent connection).
    We created a custom authenticatoin scheme for App2 - this scheme checks for the username cookie (set by App1). We would like for App2 to use Connect2 (HTMLDB_PUBLIC_USER is the default user specified and it uses connection pooling).
    Is it possible to set a cookie from App1, Connect1 for App2, Connect2 - then redirect to App2 and pick up that cookie?
    Here is an example of what we are trying to accomplish:
    A user loggs into App1, we set a cookie, and the user is redirected to App2. If the cookie exists, we allow them access to the home page in App2, if no cookie, we redirect back to a 'Login Failed' page in App1. We don't want App2 to use the same database connection as App1 though, we need App2 to use connection pooling.
    Is this possible? OR...Is there a better way to accomplish what we want to do?
    This is an enhancement to an existing app. Our requirements are to use Database Authentication (setup where pass expires after 60 days or so, cannot reuse last 3 passwords, etc.) - which is already setup and being used by other applications in our organization. All of our users have accounts in the database. We don't want users to have a new username/pass - and we don't want to manage a separate group for HTMLDB apps.
    The existing application uses HTMLDB's built in authentication - which uses database username/pass, and it uses connection pooling, but we cannot handle the pass expire stuff in it, unless there's something we're not seeing or understanding - at least that's how our DBA explained it to us.
    Any help with this will be appreciated so much. I can send you the code we have if needed.
    Thanks!

    Same problem here.  I have so many problems with this remote app.  Is there an iTunes API? I would like to write my own remote app that actually works.

  • Error setting cookie while login process

    Dear forum users,
    i am getting this error while login into my own application.
    Content-type: text/html; charset=ISO-8859-1 Set-Cookie: DHW_COOKIE=EEDD257F53989F57; path=/; Location: f?p=100:1000:155225166267009
    I am using a process on submit after computation. This process is before the login process.
    10: set Cookie
    20: login
    This source would setting the cookie before login:
    declare
    p_text_raw RAW(128);
    p_key RAW(128) := utl_raw.cast_to_raw('Key88888');
    p_crypto_typ NUMBER := dbms_crypto.des_cbc_pkcs5;
    p_encrypted_raw RAW(2048);
    p_decrypted_raw RAW(2048);
    begin
    -- Benutzername und damit den Cookie-Inhalt verschlüsseln
    p_text_raw := UTL_I18N.STRING_TO_RAW (lower(:P100_USERNAME), 'AL32UTF8');
    p_encrypted_raw := dbms_crypto.encrypt(
    src=> p_text_raw,
    typ => p_crypto_typ,
    key => p_key);
    -- Verschlüsseltes Cookie senden
    owa_util.mime_header('text/html', FALSE);
    owa_cookie.send(
    name=>'DHW_COOKIE',
    value=>p_encrypted_raw);
    owa_util.http_header_close;
    exception
    when others then null;
    end;
    Any ideas for this error ?
    regards
    Frank
    Hello community,
    any comments ?
    Edited by: handwerk.net on Dec 16, 2009 7:31 PM

    Here's one more reason why this error occurs in Toad. It is when you have more than one Oracle Client installed on your machine. Even when you select the correct Oracle Home in "Connect Using" field of Toad, you still get this error "Can't initialize OCI. Error -1". So, to solve that you need to go to the installation folder of that Oracle Home (e.g. C:\Oracle\ora92\), then go to the BIN folder. Open Oracle.Key in Notepad and confirm that it is showing Registry entry/path to the correct Oracle Home (e.g. HOME0 or HOME1 or whatever).
    I hope this helps.

  • XSQL set-cookie

    When I write an XSQL cookie, it won't actually do it until i refresh the login screen, i.e.:
    1) Enter username and password into XHTML page
    2) Post to auth.xsql
    3) auth.xsql reads the username and password and authenticates
    4) all user information for that username and password is pulled out of the database
    5) attempt at writing cookie fails.
    6) when i refresh the page, the cookie then has a value and shows up.
    Why is this? And also, is there any way of deleting the cookie, like with a logout button, using XSQL? Maybe like XSQL:delete-cookie ?
    Thanks!
    Here's the code:
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="/dvd/dvd.xsl"?>
    <database connection="dvd" xmlns:xsql="urn:oracle-xsql">
    <xsql:query id-attribute="" tag-case="lower" rowset-element="allusers" row-element="userinfo" bind-params="username password">
    SELECT *
    FROM LKUP_USER
    WHERE USERNAME = ? AND PASSWORD = ? /* AND ACCESSLEVEL = 1 */
    ORDER BY USER_ID
    </xsql:query>
    <xsql:set-cookie name="authuser" only-if-unset="no" ignore-empty-value="yes" bind-params="username password">
    SELECT USERNAME
    FROM LKUP_USER
    WHERE USERNAME = ? AND PASSWORD = ? /* AND ACCESSLEVEL = 1 */
    </xsql:set-cookie>
    <xsql:include-request-params/>
    </database>--
    Malik Graves-Pryor

    This the flat XML result when the page is first loaded:
    <?xml version="1.0" ?>
    - <!-- <?xml-stylesheet type="text/xsl" href="/dvd/dvd.xsl"?>
    -->
    - <database>
    - <allusers>
    - <userinfo>
    <user_id>1</user_id>
    <firstname>Malik</firstname>
    <lastname>Graves-Pryor</lastname>
    <username>malik</username>
    <password>malik</password>
    <email>[email protected]</email>
    <accesslevel>0</accesslevel>
    </userinfo>
    </allusers>
    - <request>
    - <parameters>
    <password>malik</password>
    <username>malik</username>
    </parameters>
    <session />
    <cookies />
    </request>
    </database>and here is what it looks like when I refresh the page, doing nothing else:
    <?xml version="1.0" ?>
    - <!-- <?xml-stylesheet type="text/xsl" href="/dvd/dvd.xsl"?>
    -->
    - <database>
    - <allusers>
    - <userinfo>
    <user_id>1</user_id>
    <firstname>Malik</firstname>
    <lastname>Graves-Pryor</lastname>
    <username>malik</username>
    <password>malik</password>
    <email>[email protected]</email>
    <accesslevel>0</accesslevel>
    </userinfo>
    </allusers>
    - <request>
    - <parameters>
    <password>malik</password>
    <username>malik</username>
    </parameters>
    <session />
    - <cookies>
    <authuser>malik</authuser>
    </cookies>
    </request>
    </database>As you can see, the cookie "authuser" is written, but only after I refresh the page. Any clues to that, and also how to delete the "authuser" cookie later on using XSQL so that one can log out of the app?
    p.s.: Steven, are you going to release an updated "Building Oracle XML Applications" book anytime within the near future, i.e., next 1-3 months?
    Malik Graves-Pryor

  • 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.

  • What to do with this? "cookies dir: cannot make folder /cookies: Permission denied (error 13)"

    What to do in this case???
    cookies dir: cannot make folder /cookies: Permission denied (error 13)

    Re: Installing Creative Cloud Desktop but I got Error 13 an issue permission on my MacBookPro, why?

  • Getting an error message that says: "Error starting Creative Cloud"  "cookies dir: cannot make folder / cookies: Permission denied (error 13)"

    getting an error message that says: "Error starting Creative Cloud"  "cookies dir: cannot make folder / cookies: Permission denied (error 13)"

    Please refer the thread: Installing Creative Cloud Desktop but I got Error 13 an issue permission on my MacBookPro, why?.
    Regards,
    Romit Sinha

  • Setting cookies across domains

    Hi there all,
    I'm posting this in desperation to be honest, don't think
    there is a cut'n'dried
    answer to this one.
    I've got a horrible situation, (don't ask why, it's far too
    complex and to
    be quite honest.. boring :) ).
    I'm trying to "mesh" together a classic .asp with an asp.NET
    site on 2
    separate domains.
    Basically I've got a page from the asp.NET site (eg.
    www.something.co.uk)
    displayed within an iframe on the .asp (eg
    www.another.co.uk). So far so
    good.
    I need to set a cookie on www.another.co.uk and be able to
    read it, or
    replicate it on www.something.co.uk. Because they are not
    sub-domains I can't
    set the cookie direct because of security restrictions.
    So, I thought I could pass a URL variable across to
    www.something.co.uk via
    the iframe URL, and then using javascript to read said URL
    variable and set
    a cookie on the www.something.co.uk domain. No go. Suspect
    there is yet
    again security restrictions to setting cookies across domains
    using iframe.
    So I'm kind of stuck. Can anybody suggest anything please,
    bearing in mind I
    have very limited control over the asp.NET
    (www.something.co.uk) site, so
    any solution I come up with needs to be using javascript.
    Major sized thanks in advance.
    @ndyB

    You could also pass the id as a hidden field in a form.
    Have the link call a JavaScript function. The JavaScript funcition could access the cookie and pull out the id. The function would then set a hidden field in a form to the id value and then Post the form to the secure server.
    The form would only have hidden fields so it could be tagged on the end of the HTML page and the user would never know it was there.

Maybe you are looking for

  • Unable to show Unicode Data in Oracle RESTful Service JSON

    Hi Everyone. I have stored unicode data in Oracle database and when i retrieve in sql query it is showing the same. But when i retrieve the data in json using oracle RESTful web service (GET), it bringing with unknown character as shown below. next:

  • AVCHD - Is My PC Good Enough?

    Hello, I shot some video on my new Panasonic HMC40 and tried to edit it in Premiere. I have done SD video for years and thought my PC was pretty powerful, but the AVCHD video mopped the floor with my PC. Here is my current setup: AMD Phenom II 1055T

  • Signature Block : AssureSign Documaker 12.2

    Hello, We are planning to integrate AssureSign Signature handling on our Forms. Since this is the first time, I would like to reach out the more knowledge people in the group to see if we can get some assistance in getting an overview on how to go ab

  • Adobe Application Manager Woes

    Is there a way to completely disable the Adobe Application Manager? It always fails to update programs properly and I have COMPLETELY lost faith in it. I have had to uninstall/reinstall Illustrator and Photoshop several times after it has broken my i

  • WARNING - Last redo log file switch interval was 6 minutes. Next interval p

    Hello! I just started monitoring my Oracle via ConSol Nagios script. Now it show`s a Warning because: WARNING - Last redo log file switch interval was 6 minutes. Next interval presumably >2 minutes. Second incident in a row. As I do not know much abo