Limit to size of POST in forms using javax.servlet.http.HttpServlet?

Discussion in 'Java' started by news.amnet.net.au, Sep 15, 2004.

  1. Hi

    I am running Apache Oracle http server 1.3.22 and I have written a jsp where
    the size of the information sent in a form with the POST procedure can be
    quite large: long description fields together with a long list of pathnames
    of files. The POST event sends of this information to another jsp where file
    uploading is done. Note that I am forced to use an older Java Runtime
    environment, namely Java(TM) 2, build 1.3.1_01 as that is what is packaged
    with Oracle.

    The problem is that when the description and/or the list of pathnames is
    very long, the jsp window just hangs (there isn't even an hourglass to tell
    the user it is busy processing).

    I have independently tested making very large uploads with a non-browser
    java program to my Oracle CMSDK area (files in a database with metadata) and
    there seems to be no limit to that.

    I suspect the problem is with the size of the strings that are posted to the
    next jsp, before the upload is done. In any case, uploading only starts in
    the next window, so if the upload is the problem one can expect the browser
    to display the next window, then in that second window hang on the upload.
    However, I never get to my next window.

    In addition, I also have this problem in another jsp where there is no
    uploading but again, very large description fields.

    I have tried manually setting the contentlength with the build-in http
    response/request functions of javax.servlet.http.HttpServletRequest and
    javax.servlet.http.HttpServletResponse i.e.

    response.setContentLength(5000);

    In fact, this does not only seem to set the size of what can be posted, but
    also the size of everything showing on the page - if you set it to small,
    only part of the page is displayed, if you set it too large, things appear
    twice!

    Setting the content length does not seem to help at all - and if you check
    the contentlength without setting it first with

    int contentlength = request.getContentLength()

    the size of the content is automatically adjusted for the amount of
    information in the page. However, over contentlength around 1500 the page
    always just hangs forever.

    Is there a limit to the size of the information that can be sent via a POST
    event? If so, is there a place where this can be changed?
    Is the limit a web server limitation, a javax.servlet.http.HttpServlet
    limitation or perhaps a limitation of the browser? Most people here use
    Internet Explorer.

    Any help or information will be greatly appreciated.

    Thanks

    Hugo
     
    news.amnet.net.au, Sep 15, 2004
    #1
    1. Advertising

  2. news.amnet.net.au

    Sudsy Guest

    news.amnet.net.au wrote:
    <snip>
    > Is there a limit to the size of the information that can be sent via a POST
    > event? If so, is there a place where this can be changed?
    > Is the limit a web server limitation, a javax.servlet.http.HttpServlet
    > limitation or perhaps a limitation of the browser? Most people here use
    > Internet Explorer.

    <snip>

    There are a couple of parameters you might want to tweak:
    LimitRequestLine and LimitRequestBody.
    But if either is exceeded then you should have an error
    message in the log file, even if nothing gets back to the
    browser.
     
    Sudsy, Sep 15, 2004
    #2
    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. DiscoStu
    Replies:
    6
    Views:
    13,735
  2. Jason
    Replies:
    3
    Views:
    14,407
    Ryan Stewart
    Feb 20, 2005
  3. news.amnet.net.au

    Limit to size of POST in forms?

    news.amnet.net.au, Sep 10, 2004, in forum: HTML
    Replies:
    2
    Views:
    559
    Isofarro
    Sep 10, 2004
  4. Andrew Thompson

    javax.servlet and javax.servlet.http

    Andrew Thompson, Apr 24, 2007, in forum: Java
    Replies:
    1
    Views:
    683
    newbie_at_tomcat
    Apr 25, 2007
  5. Lew
    Replies:
    1
    Views:
    623
    newbie_at_tomcat
    Apr 25, 2007
Loading...

Share This Page