Problems passing 'large' files using <input type=file>

Discussion in 'Java' started by Per Magnus L?vold, Aug 18, 2004.

  1. Hi,
    I have a JSP application connecting to an Oracle database. The
    application takes a file as a parameter and parses its contents.
    When the file has approx. 500 lines, the application works fine. But
    when the file has several thousand lines, the application hangs. After
    a while (~2 minutes or more) the JSP finishes without processing the
    whole file. It seems as if only part of the file has been processed.

    Another disturbing detail is that the JSP application also ignores all
    code that follows the parsing of the input file when it receives
    'large' text-files (> 1 MB).

    Could this be some parameters to be set in the Java engine (not sure
    if this is the correct term) on the server? (max request size?
    timeout?)


    Hope someone can help! :)

    Regards, Per Magnus
     
    Per Magnus L?vold, Aug 18, 2004
    #1
    1. Advertising

  2. (Per Magnus L?vold) writes:

    > Another disturbing detail is that the JSP application also ignores all
    > code that follows the parsing of the input file when it receives
    > 'large' text-files (> 1 MB).


    Do you use the correct method ("POST") and enctype
    ("multipart/form-data") for the form? You really should not use the
    default enctype "application/x-www-form-urlencoded" when using <input
    type="file">.
     
    Tor Iver Wilhelmsen, Aug 18, 2004
    #2
    1. Advertising

  3. Yes, I'm using the:
    <input type=file action="parser.jsp" method="post"
    enctype="multipart/form-data">

    I suspect there to be a 1MB limit in JServ for POST parameteres, but
    this is only a guess... I'm still resarching the matter, but I am
    thinking about re-wrinting my application as an applet so that I don't
    have any POST'ing problems.
    But any help is still gladly accepted! ;-)

    -Per Magnus


    Tor Iver Wilhelmsen <> wrote in message news:<>...
    > (Per Magnus L?vold) writes:
    >
    > > Another disturbing detail is that the JSP application also ignores all
    > > code that follows the parsing of the input file when it receives
    > > 'large' text-files (> 1 MB).

    >
    > Do you use the correct method ("POST") and enctype
    > ("multipart/form-data") for the form? You really should not use the
    > default enctype "application/x-www-form-urlencoded" when using <input
    > type="file">.
     
    Per Magnus L?vold, Aug 18, 2004
    #3
  4. Per Magnus L?vold

    Cid Guest

    On 18 Aug 2004 02:37:00 -0700, (Per Magnus
    L?vold) wrote:

    >Another disturbing detail is that the JSP application also ignores all
    >code that follows the parsing of the input file when it receives
    >'large' text-files (> 1 MB).


    Is there perhaps a meaningful message from the web server / JSP
    container's log file? That might help pin down what's happening.
     
    Cid, Aug 18, 2004
    #4
  5. We checked the Apache's error.log and a JServ log, but couldn't find
    any error message concerning this.
    I suspect this is caused by either by:
    1) a timeout in JServ (no timeout message, however)
    2) perhaps JServ doesn't handle parameters larger than 1 MB? (but I
    would also expect this to be handled with a error message...)
    3) some local network problems. The network here is very secure, and I
    wouldn't be very surprised if there is an intermediate
    web-proxy/firewall which causes problems here.

    Regards, Per Magnus

    Cid <> wrote in message news:<>...
    > On 18 Aug 2004 02:37:00 -0700, (Per Magnus
    > L?vold) wrote:
    >
    > >Another disturbing detail is that the JSP application also ignores all
    > >code that follows the parsing of the input file when it receives
    > >'large' text-files (> 1 MB).

    >
    > Is there perhaps a meaningful message from the web server / JSP
    > container's log file? That might help pin down what's happening.
     
    Per Magnus L?vold, Aug 26, 2004
    #5
  6. Per Magnus L?vold () wrote:
    : Yes, I'm using the:
    : <input type=file action="parser.jsp" method="post"
    : enctype="multipart/form-data">

    If that's what your html uses then the html is wrong.

    The action, method, and enctype are form attributes, not input attributes.
     
    Malcolm Dew-Jones, Aug 29, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Maxim
    Replies:
    0
    Views:
    411
    Maxim
    Jul 7, 2003
  2. Roberto
    Replies:
    3
    Views:
    310
  3. Ron Brennan
    Replies:
    5
    Views:
    315
    Dr John Stockton
    May 14, 2004
  4. Replies:
    5
    Views:
    881
    Xho Jingleheimerschmidt
    Apr 2, 2009
  5. Tarkeshwar
    Replies:
    2
    Views:
    192
Loading...

Share This Page