Results 1 to 4 of 4
  1. #1
    renuka_anil is offline Member
    Join Date
    Dec 2008
    Posts
    12
    Rep Power
    0

    Question saving bytes received in different request

    Hi All,

    Im new to forum and to java . Im devloping an application that uses HttpServlet for receiving request from mobile device.

    Im uploading an image from mobile to server and saving it on server.

    I am accepting one chunk in one request and saving it locally.
    But i dont know how to save second chunk along with first. Means append next to previous.

    Please need help. If any body knows please tell me.
    If any can give code snippet then it will be great

  2. #2
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    7

    Default

    Duplicate post. Doing this discourages folks from being helpful

  3. #3
    renuka_anil is offline Member
    Join Date
    Dec 2008
    Posts
    12
    Rep Power
    0

    Question Saving bytes received in different request

    Hi,

    Sorry for duplicate post. But I searched forum and i did not get anything regarding this. So, I posted it.

    If you know any link or post regarding this then please let me know.

    I need help coz im in very bad situation.

    Thanks.

  4. #4
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    8

    Default

    Basically, what you need to do is save each chunk, and, when you have received all the chunks, you then retrieve them and process them.

    If this is a small app on a single instance Web server, you can use a class with a static method to hold the chunks in a static HashMap. Be sure to synchronize! However, this will *not* work on a Web server farm.

    You can also store the chunks in a database. That's a little more effort, but it will always work.

    I suggest starting with the first approach as a prototype. Once the process works, use the database.

Similar Threads

  1. saving bytes received in different request
    By renuka_anil in forum Java Servlet
    Replies: 18
    Last Post: 12-26-2008, 01:12 PM
  2. Replies: 7
    Last Post: 10-28-2008, 02:41 PM
  3. midi bytes
    By willemjav in forum Advanced Java
    Replies: 77
    Last Post: 07-29-2008, 04:10 PM
  4. Reading bytes from InputStream
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-25-2007, 08:51 PM
  5. how to know the number of bytes
    By gabriel in forum New To Java
    Replies: 2
    Last Post: 08-06-2007, 06:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •