Can servlet know if data reaches client?

Is there any way for a servlet to tell if the data it sent on the response
          output stream really reached the client? Presumably using sockets we could
          check if the connection was closed cleanly or if it aborted but the servlet
          API doesn't seem to have anything relating to this.
          Does the new fuss over web services provide something to help with this - it
          must be an issue with web services!
          Thanks,
          -Dominic
          

Hi Mike,
          my experiments suggest otherwise:
          If my client makes a request and then is killed off, the server appears to
          notice and the isCommitted() method on the response returns false. However,
          if I remove the network cable from the client machine after the request is
          made, the client connection times out and notices but the server does not -
          the response just vanishes. There is no IOException in this case (even
          though I explicitly flush the stream).
          It seems incredible that the TCP/IP protocol knows the connection has gone
          but there's no way for the servlets to find out.
          Cheers,
          -Dominic
          "Mike Mormando" <[email protected]> wrote in message
          news:3c6a8c1a$[email protected]..
          > "Dominic Tulley" <[email protected]> wrote in
          message
          > news:3c6a8156$[email protected]..
          > > Is there any way for a servlet to tell if the data it sent on the
          response
          > > output stream really reached the client? Presumably using sockets we
          > could
          > > check if the connection was closed cleanly or if it aborted but the
          > servlet
          > > API doesn't seem to have anything relating to this.
          > When you flush the output stream, if the client isn't connected you get an
          > IOException I believe.
          > I think that's as close as it gets.
          > Mike
          >
          >
          >
          

Similar Messages

  • How can I know when I reached space limitations

    Hi, I want to know what happens when an enviorment reachs its space limitation.
    I know that space available is 30mb per user and the only way to know how much space you've consumed is by calculations about the number of registers.
    But I'd like to know how can I know when I reached that limit and what is the procediment to buy more space (overall how much time it takes).
    Every comment will be appreciated.
    Thank you.
    Edited by: linkln on 13/08/2010 10:29 AM

    We recently instituted a new CRM On Demand storage policy and we realize it hasn’t been disseminated as broadly as it should be. This new policy is significantly more generous than the former policy at no additional charge. We used to offer 30MB pooled storage for Multi-tenant, 45MB for Single-Tenant Standard Edition, and 60MB for Single-Tenant Enterprise Edition (this space covered standard records and attachments).
    Customers often think in terms of records and not MB, especially when they are considering importing x million contacts or other records. An average record uses 2KB. We have made the following changes:
    1)     Multi-tenant. Converted the 30MB to 15,000 records. Added 100MB per user for attachments;
    2)     Single-Tenant Standard edition. Converted the 45MB to 22,500 records. Added 150MB per user for attachments;
    3)     Single-Tenant Enterprise edition. More than doubled the 60MB to 70,000 records. Added 200MB per user for attachments;
    In summary the new limits are:
    Storage Allotment by CRM OD Offering______     Records per User_____Megabytes for Attachments to Records per User
    Multi-Tenant___________________________15,000 ____________100
    Single-Tenant Standard Edition_____________22,500 ____________150
    Single-Tenant Enterprise Edition____________70,000 ____________200
    A couple of additional notes:
    •     When counting records we are only counting primary data records. Meta-data and configuration records don’t count against the limit.
    •     Usage is pooled as before (i.e. a customer receives the amount of storage per subscriber as listed above multiplied by number of subscribers).
    Edited by: bobb on Aug 13, 2010 10:57 AM
    Edited by: bobb on Aug 13, 2010 11:03 AM

  • SCM APO can we copy the data from client 001 to client 002???

    Hi Guru's
    SCM APO can we copy the data from client 001 to client 002???
    If it is possibulity please let me know?
    Regards,
    Sree

    Yes you can do.
    Tcode SCCL.
    Options :
    When copying clients, you can select what you want to transfer from the source client to the target client:
    User masters: You select this option, for example, if you want to give all users of an existing client the same authorizations in the target client.
    Client-specific Customizing: You select this option, for example, if you want to set up a new client in an existing system.
    Client-specific Customizing and master/transaction data:
    You select this option, for example, if you want to set up a test client that is identical to the production client (in the same system).
    Client-specific and cross-client Customizing: You select this option, for example, if you want to set up a quality assurance system based on the production client of another system.
    Client-specific and cross-client Customizing and master/transaction data: You select this option, for example, if you want to set up a test client based on the production client of another system.
    http://help.sap.com/saphelp_46c/helpdata/EN/69/c24c4e4ba111d189750000e8322d00/frameset.htm

  • How can i know the size of client

    hi
    how can i know the size of client ?
    SAP  ECC6
    OS AIX 5.2
    DB  ORACLE10g
    regards
    Karan

    Hi,
    1)Test run normal client copy .
    =DDt will give the size.
    2)There is SAP note for Client size analyse.
       Here is 118823
    3)run program YSTABSIZ.
    Regards,
    Muralidhar

  • How can i know the date when i bought my mac?

    I would like to know the date when I bought my mac to know if it's still under warranty.

    Input the serial number at the link below.
    https://selfsolve.apple.com/agreementWarrantyDynamic.do

  • How can servlet serve more than one client's socket links when tomcat start

    I have done this in the servlet's 'init' method:
    while (true)
    Socket sk = server.accept ();
    new ServerThread (sk).start ();
    but tomcat STOPPED at this point! The webapp didnot even been installed. But I want to show the index.jsp pages of the webapp, the code above only running at background. How can I do that?

    Eeeew... what are you doing there? Of course Tomcat stops. You have an infinite loop, and accept() blocks until someone actually connects.
    And a servlet shouldn't be using sockets anyway. This is most ugly, and possibly against the J2EE specs.

  • How can i know the data that labview takes when calls visa read?????????????

    First sorry for my english!
    I have a program in wich i read data trough USB(in bulk mode) from a FIFO(from a microprocesor) . I don´t know if when i do a visa read and the program that is running in my microprocessor is waiting for the FIFO full, what data catch the visa read?, because labview don´t wait, always take data when visa read is call!!
    THANKS THANKS......

    A read operation just retrieves the bytes that are available on the serial port. Means that these bytes are there because they have already been sent by the connected device. They may be remains from a previous communication.
    Your protocol should ensure that
    1/ the serial buffer is empty before your start your communication session.
    2/ you read either a specified number of bytes, or all the incoming bytes, using a timeout in case of failure
    3/ you leave things clean after communication (empty buffer, close port...).
    Try to be e more specific if you need further help.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • HT2584 how can i know my date of purchase?

    Hello,
    I had a provlem with my iPad i lose all my documents in Pages App, also I tried to add my Mac pro with the my other Apple product (iPhone-iPad) but i'v been asked about my date of purchase and i dont remeber it?
    Thanks,
    Banan

    Try the forums for those products, this one is devoted to workstations, you'll do well to find MacBook, iPad etc and OS X you are using - obviously NOT 10.6.x

  • How can we view the data asociated with Request ID

    Hi All,
    I have data loaded in an ODS there are multiple files loaded in this ODS. Now i want to view data for a perticuler request OR i want to know how can we know the data associated with a perticular request.
    Please help me out.
    Thanks & Regards
    Amit Kumar

    Copy the request number (not request ID) from the ODS manage screen, Goto RSRQ give the request number and execute. it shows the monitor screen- now goto PSA from the top and check the data. But this possible only if you are loading data to PSA also along with ODS.
    Otherwise, Goto Display Data of ODS from the right click on it -- in the selection screen give the Request ID that you want to check the data. Then it displays only that request data.
    Hope this helps.
    Veerendra.
    Edited by: denduluri veerendra kumar on Dec 1, 2009 12:40 PM
    Edited by: denduluri veerendra kumar on Dec 1, 2009 12:43 PM

  • Can't send POST data from servlet

    Hi,
    I have a servlet that receives data via GET method, process the request and then it has to send feedback to an url, but the query string that
    I have to send must be in a POST method.
    I ilustrate this:
    http://host:port/myservlet?param1=value1
    myservlet proccess and then calls
    http://external_url (with param2=value2 via POST)
    I've tried to put an HttpURLConnection
    URL url = new URL("http://localhost:7001/prueba.jsp");
    java.net.HttpURLConnection con= (HttpURLConnection)url.openConnection();
    //POST data
    URL url = new URL("http://localhost:7001/prueba.jsp");
    HttpURLConnection c = (HttpURLConnection)(url.openConnection());
    c.setDoOutput(true);
    PrintWriter out = new PrintWriter(c.getOutputStream());
    out.println("param2=" + URLEncoder.encode("value2"));
    out.close();
    but I get this error.
    lun mar 10 13:53:46 GMT+01:00 2003:<W> <ListenThread> Connection rejected: 'Login timed out after 5000 msec. The socket
    came from [host=127.0.0.1,port=2184,localport=7001] See property weblogic.login.readTimeoutMillis to increase of decreas
    e timeout. See property weblogic.login.logAllReadTimeouts to turn off these log messages.'
    (it's a weblogic 5.1 problem, i've been researching a little bit)
    And I don't want to call a jsp that generates a post form, and then it's auto-submitted with javascript. (this will be the last remedy!!)
    How can i do this?
    All suggestions will be grateful.
    Thanks in advance.
    PD: sorry for my english :)

    I make an URLConnection and I intended to know if the post data was
    sent right. Then, in my machine, under weblogic 5.1, I developed a jsp with this code:
    <%
    URL url = new URL("http://machine2/examples/prueba.jsp");
    HttpURLConnection c = (HttpURLConnection)(url.openConnection());
    c.setDoOutput(true);
    PrintWriter outd = new PrintWriter(c.getOutputStream());
    outd.println("param1=" + URLEncoder.encode("value1"));
    outd.close();
    c.disconnect();
    %>
    and in machine2 (using tomcat 4.1), I simply put a line in prueba.jsp:
    System.out.println(request.getParameter("param1"));
    and I don't get "value1" in the tomcat log as expected (I think).
    I also tried with adding this properties:
    c.setRequestProperty("Content-Length", size...);
    c.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
    and it didn't work!
    what's wrong?

  • How can deploy the application and data to client?

    As I know, I can burn a CD with http://mobileserver/setup/webtogo/setup.exe and distribute this CD to client to install web-to-go Client.
    But how can I create a package for client to install my application and data?
    What tools should I use? Where can I get the information?
    Can you give/show me a simple example to make a package and install the package?
    Thanks a lot.

    Only the carrier to whom the device is locked can unlock it.
    StraightTalk is not a supported carrier... not all features may work.

  • I'm in cycle mode, and 'merge' is clicked in preferences. However, when I record, my previous track data keeps getting overwritten. Does anyone know what I'm doing wrong. Interestingly, I can still see the data in the region.

    I'm in cycle mode, and 'merge' is clicked in preferences. However, when I record, my previous track data keeps getting overwritten. Does anyone know what I'm doing wrong. Interestingly, I can still see the data in the region.

    jamestait wrote:
    when I record, my previous track data keeps getting overwritten.
    since you didn't specify, are you recording in a single take?
    http://www.bulletsandbones.com/GB/GBFAQ.html#multipassrecording
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • How can I know which clients are connected to my network through express and which are connected through extreme?

    I have an airport express extending, through wireless, a network provided by an airport extreme. How can I know which clients are connected to my network through express and which are connected through extreme?
    Here you can see both routers:
    I would expect to some clients connected to the express, other than the extreme. And that's all I see: only the airport extreme appears as client of the airport express.
    Below, one can see the summary of the config for both routers.
    Would somebody explain it?
    Thanks,
    Marcelo
    Message was edited by: Marcelão

    please disregard this answer.
    Message was edited by: Marcelão

  • My Iphone 4 has a cracked screen and has made it impossible for me to unlock my pin. I an giving the phone to a friend but want to know if there is a way I can ensure all my data is wiped off it before I do. Can anyone help?

    My Iphone 4 has a cracked screen and has made it impossible for me to unlock my pin. I an giving the phone to a friend but want to know if there is a way I can ensure all my data is wiped off it before I do. Can anyone help? I have upgraded to a iPhone 5 so Im not sure if the old one would have automatically wiped the old phone. I have lots of emails and messages I wouldnt want peo

    Have you synced this phone, with iTunes, while the passcode was enabled? If so, plug it in, iTunes running, & hit the Restore button on the Summary Pane. This will also erase the phone.
    However, if you have not synced, while the passcode was enabled, you will not be able to do this without first enereting the passcode. If that's the case, try recovery mode:
    http://support.apple.com/kb/HT1808

  • My phone when attached to the charger boots up reaches the password screen, i enter my password and it goes to home screen then shuts itself off and reboots. is my phone possessed or how can i fix it? can i get the data off of it even if the phone is gone

    my phone when attached to the charger boots up reaches the password screen, i enter my password and it goes to home screen then shuts itself off and reboots. is my phone possessed or how can i fix it? can i get the data off of it even if the phone is not salvageable? thank you so much in advance for your help!

    Make sure you have the Current Version of iTunes Installed on your computer
    iTunes free download from www.itunes.com/download
    Then see Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Take your time... Pay particular attention to Steps 3 and 4.
    After you have Recovered your Device...
    Re-Sync your Content or Restore from the most recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766
    Note.  Once the Device is asking to be Restored with iTunes... it is too late to save anything... and you must continue with the Recovery...

Maybe you are looking for