Drop of Cookie file in a Client's Computer

Well... i m stuck in this problem from more than 3 months.. and hav'nt find the solution yet..
my query is regarding the "COOKIE SERVLET", i have read the API and read differnt examples.
MY PROBLEM:
1) Firstly, i was trying to send a Cookie to a clients Browser (computer)
2) Second, i found a program which send a cookie to a clients browser but when i try to implement the same code on a different file/Class name, it does'nt send a cookie file or if i simply change the file/class name with same code, it dosn't send the COOKIE to a client's Browser / Computer.
My Server:
I m using JRUN-3.1 & Servlet Exec 4.2 & 5
i have tried the same thing with different server and same problem occurs.
i could'nt find the solution yet.. plz help
Sabbah Jamil
[email protected]
[email protected]
[email protected]

THANK U... :D ...
it is working .. but i wana know that is this problem is only i m facing or this problem is faced by every Java Programmer??
and i also want to know that y v have to add line ----> cookie.setMaxAge(3600 * 24 * 7) <------- is it compulsory required by SERVLET COOKIE or else?????????? and i hve seen few examples and this line was not used.
Sabbah

Similar Messages

  • Avoiding to save cookie file on the client's disc

    Hello folks,
    I don't use client variables in my application, but app. has
    saved client-cookie file on my HDD. For example:
    CFID
    31987
    www.site.com/
    1536
    3950493312
    31986928
    4097529456
    29784164
    CFTOKEN
    68660018
    www.site.com/
    1536
    3950493312
    31986928
    4097629456
    29784164
    I don't want client/visitor can conclude that I'm using CF.
    CF files in the app. have not cfm or cfc extension, of course.
    How can I prevent the app. to save any cookie files on
    clients machine? Is it possible?
    Thanks,
    d.

    That cookie is used to track sessions. You can disable the
    cookie in the <cfapplication> tag in your Application.cfm
    file at the root of your website.
    http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-pa3.htm#wp1097308
    <cfapplication setClientCookies="No">
    If you need sessions, but don't want to use cookies, you will
    need to manually append #URLToken# to the end of all URLs on your
    site (form posts, <a href> links, javascript redirects,
    etc).

  • Can't copy files to network client's folders

    We just switched from ARD 2.0 to ARD 3.0. ARD 3.0 is a great product - if it works. I can only copy files to ARD-clients, if I copy to the local hard disk, i. e. if it is a local client or if it is a network client and I copy to the top level of the volume. But if I copy files to the network client's desktop it doesn't work. I think the reason is that the network client's desktop is located on the server and not on the local hard disk.
    The same problem occurs if I use the new feature to copy files from or to a client using drag-and-drop with the observe window. It works with the client's local hard disk, but not with folders located on the server. This time there is no error message, but the message "waiting" - and the waiting never terminates.
    Has anybody a helping idea? Thanks!
    Greetings from the country of the football (soccer!) world cup!
    Horst

    I had the same problem, but I managed to fix it.
    In WGM check that the sharepoint of your users Home Folder is set to owner root with Read and Write permissions.
    I also created an ard_admin group in WGM and enabled open directory management on the client Macs. (Page 62 of the ARD admin Guide.)

  • Set  cookie file name

    I work with WAS5.1 against IE6.
    My cookie file create and store at the client's hard disk in
    C:\Documents and Settings\<user_name>\Cookies.
    Currently the name of my cookie file is <user_name>@<aplication_name>[<number>].txt
    How to set constant name to cookie file?
    Or how to set name independent from aplication_name?

    May be using RSEF. If not changing the name, you can certainly control the cookies nicely. I have used it once in my previous projects it works Nice.
    http://www.javaworld.com/javaworld/jw-01-2001/jw-0126-servlets-p2.html
    Hope that helps. Good luck.
    Sreekanth varidhireddy

  • I want to read a file on the client side

    Hi all,
    I want to read a file on the client side, then the server show the contents of that file.

    Signed applet sounds cool - I guess Microsoft's ActiveX technology would be the mirror of this.
    Write you file access code as you normally would and then just drop it in a applet and JAR it up.
    Use keytool to sign it - users will be requested to accept/review your certificate in order to grant file-access permissions.
    Warm regards.

  • How to upload file from java client to php

    hi
    i am trying to upload/send a file from client using swing/applet
    and receiving it with php code.
    here is the php code which uploads the post file from the client
    $uploaddir = "/home/raghavendra/Documents/";
    $file = basename( $_FILES["uploadedfile"]["name"]);
    echo "file:\n".$file;
    $uploadfile = $uploaddir. $file;
    if (move_uploaded_file($_FILES["uploadedfile"]["tmp_name"],$uploadfile)) {
    echo "File is valid, and was successfully uploaded.\n";
    else {
    echo "File upload failure Possible file upload attack!\n";
    and corresponding different java code which post the
    1)
    public void postmethodTest(String filefrom){
    try{
    String hostname = "localhost";
    int port = 80;
    InetAddress addr = InetAddress.getByName(hostname);
    Socket socket = new Socket(addr, port);
    // Send header
    String path ="/php_prgs/var/www/nsboxng/htdocs/tryupdate.php";
    File theFile = new File(filefrom);
    System.out.println ("size: " + (int) theFile.length());
    DataInputStream fis = new DataInputStream(new BufferedInputStream(new FileInputStream(theFile)));
    byte[] theData = new byte[(int) theFile.length( )];
    fis.readFully(theData);
    fis.close();
    DataOutputStream raw = new DataOutputStream(socket.getOutputStream());
    Writer wr = new OutputStreamWriter(raw);
    String command =
    "POST "+path+" HTTP/1.0\r\n"
    + "Content-type: multipart/form-data, boundary=mango\r\n"
    + "Content-length: " + ((int) theFile.length()) + "\r\n"
    + "\r\n"
    + "--mango\r\n"
    + "content-disposition: name=\"MAX_FILE_SIZE\"\r\n"
    + "\r\n"
    + "\r\n--mango\r\n"
    + "content-disposition: attachment; name=\"datafile\"" ;
    String filename="test.doc\"\r\n"
    + "Content-Type: text/doc\r\n"
    + "Content-Transfer-Encoding: binary\r\n"
    + "\r\n";
    wr.write(command);
    wr.flush();
    raw.write(theData);
    raw.flush( );
    wr.write("\r\n--mango--\r\n");
    wr.flush( );
    BufferedReader rd = new BufferedReader(new
    InputStreamReader(socket.getInputStream()));
    String line;
    while ((line = rd.readLine()) != null) {
    System.out.println("out"+line);
    wr.close();
    raw.close();
    socket.close();
    } catch (Exception e) {System.out.println(e.toString());}
    2)
    public void postMethod(String strURL, String filefrom){
    try {
    String fname = filefrom.substring(filefrom.lastIndexOf("/")+1, filefrom.length());
    File input=new File(filefrom);
    // Prepare HTTP post
    PostMethod post = new PostMethod(strURL);
    // Request content will be retrieved directly
    // from the input stream
    // Per default, the request content needs to be buffered
    // in order to determine its length.
    // Request body buffering can be avoided when
    // content length is explicitly specified
    post.setRequestEntity(new InputStreamRequestEntity(new FileInputStream(input), input.length()));
    // Specify content type and encoding
    // If content encoding is not explicitly specified
    // ISO-8859-1 is assumed
    //post.setRequestHeader("Content-type", "text/xml; charset=ISO-8859-1");
    post.setRequestHeader("Content-Type","multipart/form-data");
    post.setRequestHeader("Content-Disposition", "form-data; name="+fname);
    // Get HTTP client
    HttpClient httpclient = new HttpClient();
    // Execute request
    try {
    int result=httpclient.executeMethod(post);
    // Display status code
    System.out.println("Response status code: " +result);
    // Display response
    System.out.println("Response body: ");
    // System.out.println(post.getResponseBodyAsString());
    BufferedReader console = new BufferedReader(new InputStreamReader(post.getResponseBodyAsStream()));
    String name = null;
    String line = null;
    try {
    while ((line = console.readLine()) != null) {
    System.out.println("output"+line);
    //name = console.readLine();
    catch (IOException e) { name = "<" + e + ">"; }
    // System.out.println("Hello " + name);
    } finally {
    // Release current connection to the connection pool
    // once you are done
    post.releaseConnection();
    catch(IOException e){
    but am getting else condition response from php code
    but if i post with html code it is working fine.
    can anybody help me please where i have to change the code
    please suggest me. am in a big trouble and i have to complete this as soon as possible

    One thread is enough.
    http://forum.java.sun.com/thread.jspa?threadID=5198449
    You could have bumped it instead. Also, you still just posted a junk of unformatted stuff. Furthermore, for HttpClient support ask at an HttpClient mailing list of rorum.

  • How to upload file from a client machine to server machine

    hei evryone!
    can anyone pls help me on how i can upload file from a client machine to another machine (or server). using jsp.Then later on, i can also retrieve the names of these files to place it as values for option tag in an html form.I have a seperate screen for uploading the file and the screen for displaying all the files that were uploaded on the server...
    any sample code/ ideas would be much appreciated.Thx!!!!

    hei evryone!
    can anyone pls help me on how i can upload file from a client machine to another machine (or server). using jsp.Then later on, i can also retrieve the names of these files to place it as values for option tag in an html form.I have a seperate screen for uploading the file and the screen for displaying all the files that were uploaded on the server...
    any sample code/ ideas would be much appreciated.Thx!!!!

  • How to transfer file from one client to another client?

    hello,
    i have some questions and hope you all can help me..thanks a lot first..
    Here are the questions:
    i) How can i send a file from one client to another client using RMI?
    ii) Does the client(sender) need to send the file to server, then server save it and then send it to another client(receiver)?
    iii) If using RMI, a client can receive two files from same client(sender) or different client(sender) at a same time? how to do it? when both of the files come in from same port, how to differenciate them?
    iv) For your information, i am doing the File Transfer Server-client application which sender can send any file to other client. Can you give me any ideas? thanks..
    Last, thanks again..

    Your questions reflect some ambiguity in terms.
    "Client" and "server" are commonly used in two different senses:
    1. Technical sense: A client process makes requests, and a server process fulfills the request (provides a service).
    2. IT sense: A client computer (process) makes requests of a server (computer) process, and the server (computer) processes the request.
    In the first case, any computer might be a client, or a server, or both, depending on the processes being executed. In the second case, the computers are assigned some role.
    So: If you wanted to, you could implement client/server processes communicating between two peer computers, using RMI.
    This may not be what you wanted; if you really want to distinguish client and server computers, then the answer is that yes, you will probably put files into intermediate storage on the server computer.
    Finally, you probably do not have to worry about port conflicts if you use RMI; while the initial client server contact is established through a registry operating on a standard port, the actual RMI communications is established using random ports, one for each link.

  • I cannot delete cookies after updating to 9.0.1, also when opened, I have 2 new cookie files that disappear when FF is closed.

    I have uninstalled/reinstalled 9.0.1, the same thing happens. Checked my Profile, cookies.sqlite is there when FF is closed or uninstalled. When installed and opened, I have 2 new files, cookies.sqlite-wal and cookies.sqlite-shm, along with cookies.sqlite. Is this the reason I can't delete cookies? Also I have, and have had enabled AdBlock Plus and Privacy Browsing. After updating, I can't post anything to FF Support (this is my 4th attempt, finally used Safari to post) and files under Tools, such as Clear History are accessible, I shouldn't have a History to delete.
    (1st edit)
    OK. I reinstalled FF 9.0.1 from Safari, but not directly from Mozilla. I used CNet, now things are working like they should. I have no cookies listed, except the ones I want. Private Browsing is working properly. However, I still have those 2 extra cookie files; -wal and -shm.
    (2nd edit)
    I spoke too soon. After accessing sites that I frequent, the 'ad' cookies are back (adbright, realmedia, 247realmedia) and the site cookies are eliminated, not there, gone. Now I can't login to anything and am back to Safari to access FF Support Forum. Do I have a bug? Someone please help, I'm desperate, I hate IE, Safari, Chrome, etc. They have neither the level of ad and pop-up elimination that Firefox has; nor, do they have the level of customization that Firefox has. The 2 extra cookie files, -wal and -shm, are still there when FF is open, and gone again when FF is closed. One more thing I noticed, I have a Chrome Support Application file in my Library. Could the Chrome cookie file interfere with FF cookies? I wouldn't think so, I have Safari, as well, and neither browser has ever interfaced with the other before.
    (3rd edit)
    I have uninstalled/reinstalled FF, all of my add-ons and also tried deleting the cookies.sqlite document from the FF Profile file, to no avail. I have counted, there are 14 sites listed in the Preferences>Privacy>Show Cookies pane (no pun intended) and they are all "ad" sites. These sites are also listed as blocked sites in Adblock Plus. Until someone answers, I give up, I don't know what else to do. There was only the one time that the cookies were gone from the Show Cookies pane, every other time I uninstalled/reinstalled anything, they were still there. So, until someone helps me, I'm stuck. The only thing I have not done is deleted the Profile file altogether. That is the last thing I want to do, unless I can save my bookmarks somewhere to move back after reinstallation. If this isn't rectified within a few days, I may just try that, too.

    Do you have an extension like TACO (Abine) or TrackerBlock that maintains a set of OPT-OUT cookies?
    * Targeted Advertising Cookie Opt-Out (TACO): https://addons.mozilla.org/firefox/addon/targeted-advertising-cookie-op/
    * TrackerBlock: https://addons.mozilla.org/firefox/addon/trackerblock/
    * Beef Taco (Targeted Advertising Cookie Opt-Out): https://addons.mozilla.org/firefox/addon/beef-taco-targeted-advertising/
    If you do then you need to disable or uninstall such an extension.
    If clearing the cookies doesn't help then it is possible that the file <i>cookies.sqlite</i> that stores the cookies is corrupted.<br />
    Rename (or delete) <b>cookies.sqlite</b> (cookies.sqlite.old) and delete other present cookie files like <b>cookies.sqlite-journal</b> in the Firefox Profile Folder in case the file cookies.sqlite got corrupted.
    *http://kb.mozillazine.org/Cookies

  • How to refresh XML file  from my client machine

    Hai All
    I have temp.XML and temp.XSL template in our server machine.
    when i give a print from client machine first time it gives the record,and next time it did not get refresh.Always it shows the previous records in the browser.But when i go into the server machine and click on temp.xml,it shows the current record(correct records)
    How to refresh XML file  from my client machine?
    Regards
    Dhina

    You never delete a Time Machine backup by dragging it to the Trash. You are supposed to use the TM application to manage the backups. What you will need to do now is to simply erase the drive using Disk Utility.

  • Saving The Report File (PDF) on Client Machine/PC

    Hi Everyone,
    I am using Oracle Application Server 10g (10.1.2). I have a form that calls a report (both forms and report version are 10.1.2) with ASYNCHRONOUS option and creates a file in PDF format. The report is running fine and is creating the PDF file fine BUT on the application server.
    I need to know if there is a possibility of either creating the file on the client machine/pc or transferring the file from application server to client PC. I would prefer the first option that is to create the file on client PC so the client can print or browse the report later. The second option would be ok if there is no solution for first option but I am assuming that it would take twice as much time. First to create the report on Application Server then to transfer the file from AS to client PC.
    I have already included webutil library and object library but could not find a way to save the file on client PC using any of the APIs.
    I would appreciate if some one provide me detail information. I mean syntax on how to either create the file on client PC or how to transfer the file created on application server to client PC. I would like to know where the report is created on Application server as the path will be required for transfer.
    Thanks in advance.
    Khalid

    Instead of just creating the file, open the file in a
    browser using rwservlet. That way the client can see
    it and save in his PC whenever he wants to.
    Try:
    ...write code to get report id...you must be already
    having this...
    then continue....
    :global.report_server_name:=<servername>;
    reports_servelet:='/reports/rwservlet';
    REPORT_MESSAGE := RUN_REPORT_OBJECT(REPORT_ID);     
    vjob_id :=
    substr(report_message,length(:global.report_server_na
    e)+2,length(report_message));
    hidden_action :=
    reports_servelet||'/'||'getjobid'||vjob_id||'?server='
    ||:global.report_server_name;
                                       --WEB.SHOW_DOCUMENT(hidden_action);
    Basically you get the objid for the report you ran
    and open it in the browser.
    Hope this helps.Hi,
    First of all thanks for you kind reply. Actaully user has an option to preview report and it is working fine. The reports run and display under browser as either PDF or HTML depending on option selected by user. These reports can be saved on client machine without any problem as you mentioned.
    The problem with this form is that as soon as it execute the report it exit out of form. So the reports that are previewed run under SYNCHRONOUS mode and reports that are creating files run in ASYNCHORONOUS mode. I can run preview reports also in ASYNCHOROUS mode and I have already tried it by creating TIMER and WHEN_TIMER-EXPIRED trigger and commenting EXIT_FORM built-in. But as mentioned since the form exit out WHEN_TIME_EXPIRED does not fire and it does not display the report on the browser. I can see the status of the report in print queue when it is finished successfully.
    If the report is not displayed after running in ASYNCHOROUS mode then I will be unable to save the file. That is the reason we created the FILE creation option and thought we will find a way to create/save the file on client PC but I am having hard time to do that.
    I am sure I have made myself clear. Bottom line is that previewing a report in a browse is an option but will not work for long reports and if we run in background then it will not display in a browser as form exits after calling the run_report_object to run report so WHEN-TIMER-EXPIRED is not there to show the report when it is finished.
    Thanks
    Khalid

  • I recently bought two iMac quad core i5 processor speed 2.5 Ghz. Every time I use Air Drop and I send a file from one iMac to the other, a black curtain drops and I am asked to restart the computer!!! What can I do?

    I recently bought two iMac quad core i5 processor speed 2.5 Ghz. Every time I use Air Drop and I send a file from one iMac to the other, a black curtain drops and I am asked to restart the computer!!! What can I do?

    That's a kernel panic and indicates some sort of problem either with the computer's hardware or software. Visit The XLab FAQs and read the FAQ on diagnosing kernel panics. It would help to post the panic log: Mac OS X- How to log a kernel panic.
    Meanwhile, try booting the computers into Safe Mode then restarting normally. If this is simply a disk repair or cache file problem then this may fix it.
    You can also try creating a new admin account on each computer then booting into the new account. This would help determine if the problem is related to a bad file in the user accounts.

  • SharePoint Designer 2013 after installation getting error with runtime i.e. error writing to file Microsoft.SharePoint.Client.Runtime.Local.Resources.dll Verify that you have access to that directory

    SharePoint Designer 2013 after installation getting error with runtime i.e. error writing to file Microsoft.SharePoint.Client.Runtime.Local.Resources.dll Verify that you have access to that directory
    after retry..again SharePoint Designer requires the following component require to install Microsoft.NET framework version 4 i have downloaded and try to installed but fail not work please answer what to do?
    Thanks and Regards, Rangnath Mali

    Hi Rangnath,
    For running SharePoint Designer 2013, you need to install Microsoft .NET 4.0 Framework or higher.
    Please uninstall the Microsoft .NET 4.0 Framework, and install it again. After that, reboot your machine.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • I can't drag and drop iTunes music files into Roxio Jam 6 anymore and, now I have to import music one song at a time by using the " " or "-" buttons on the bottom. What is going on? G5 Dual 2 Ghz and OS 10.4.11

    Hi. I have not used Roxio Jam for quite a long time and I just wanted to make a few CDs. Jam used to work easily and well. I have a problem. I can't drag and drop iTunes music files anymore and, now I have to import music one song at a time by using the "+" or "-" buttons on the bottom. What is going on? I trashed the preferences file and restarted Jam to no avail. I also have selected that Jam should open files with iTunes in the Jam preferences. I have a G5 DP 2Ghz PPC  machine with OS 10.4.11, iTunes 9.2.1 and Quicktime's version is 7.6.4. I have 2 GB of RAM and the machine has dual 1.25 Ghz. processors plus a 500 GB HD. Can anybody give me any suggestions?
    Thanks in advance,
    Larry

    I found an solution.
    Uninstalling AirParrot as well as the two offending AirParrotDriver.kext and APExtFramebuffer.kext files in System>Library>Extensions was the fix. All problems disappeared.

  • Can no longer drop a MIDI file into iTunes library

    Using Tiger on a G4 iMac, I could drop a MIDI file into my iTunes library and convert it to an mp3 (or other format).
    Can't get this to happen now that I'm using Leopard on a new machine (see below) - or is there a different way of doing it in Leopard?
    With thanks,
    Gilly

    Answering my own question - had iTunes set to Show Duplicates - therefore couldn't see MIDI I dropped in.

Maybe you are looking for

  • Using External LCD as Camera Viewfinder​?

    Has anyone else been wanting this function? I have not seen one thread complaining about how inept the external LCD is. I know that some people consider this a low priority, but it sure would be nice to see yoruself when taking a pic with friends and

  • Af:InputComboboxListOfValues text and value property

    Hello, I am using ADF Faces, Jdeveloper 11g. I want use an inputcomboboxlistofvalues component to let user find the necessary data from the list or search. And I want to set the value of the component to the id from the database. and text property to

  • Importing photos from Aperture 3 must be possible.

    OK first off I am new to Lightroom 3, Aperture 3 and Mac.  I have in the last few days gone from being a Windows user with Elements to being a Macbook Pro user, Lion OS, with iPhoto, Aperture 3, Lightroom 3 and Elements 9 loaded.  having read lots of

  • Elements 11 won't import my NEF files

    I"ll tried directly importing files as NEF and I've converting them to DNG usuing Adobe converter and still the error message says doesn't recognize files.  Help.  Frustrating.

  • Calling BADI or BAPI from another BADI

    Hi, Is it possible to call BADI or BAPI from another BADI.Here is my situation.. When I am saving the Lead , I would like to create Opportunity based on few lead conditions.Can I use any one of these two for creating opportunity from Lead. I have no