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

P

Per Magnus L?vold

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
 
T

Tor Iver Wilhelmsen

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">.
 
P

Per Magnus L?vold

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
 
C

Cid

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.
 
P

Per Magnus L?vold

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
 
M

Malcolm Dew-Jones

Per Magnus L?vold ([email protected]) 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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top