Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Problems passing 'large' files using <input type=file>

Reply
Thread Tools

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

 
 
Per Magnus L?vold
Guest
Posts: n/a
 
      08-18-2004
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
 
Reply With Quote
 
 
 
 
Tor Iver Wilhelmsen
Guest
Posts: n/a
 
      08-18-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (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">.
 
Reply With Quote
 
 
 
 
Per Magnus L?vold
Guest
Posts: n/a
 
      08-18-2004
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 <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> (E-Mail Removed) (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">.

 
Reply With Quote
 
Cid
Guest
Posts: n/a
 
      08-18-2004
On 18 Aug 2004 02:37:00 -0700, (E-Mail Removed) (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.
 
Reply With Quote
 
Per Magnus L?vold
Guest
Posts: n/a
 
      08-26-2004
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 <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>. ..
> On 18 Aug 2004 02:37:00 -0700, (E-Mail Removed) (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.

 
Reply With Quote
 
Malcolm Dew-Jones
Guest
Posts: n/a
 
      08-29-2004
Per Magnus L?vold ((E-Mail Removed)) 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing an array from FORTRAN to C then passing it within C andReturning it to FORTRAN deadpickle C Programming 1 11-07-2010 02:38 PM
Passing parameters to an executable vs. passing them to a server Ramon F Herrera C++ 8 09-13-2009 02:48 AM
passing copy of a pointer to a variable vs passing the copy pereges C Programming 7 06-01-2008 02:36 PM
Problems passing arrays into COM objects using win32com mb3242@gmail.com Python 0 05-13-2005 09:48 PM
Passing by const & and returning a temp vs passing by value and returningit Victor Bazarov C++ 25 03-23-2005 04:24 PM



Advertisments