Recovering from oversize upload exception ?

2001-05-17 Thread James Noctor \(NC\)

Hi Tal ?

Sorry to bother you. I say your message posted (attached) about problems
trying to gracefully reject large uploaded files.

Did you find a solution ? (Only way we can provide graceful errors is to
read the whole file which defeats the purpose of limiting the file size...)

Hope you can help.

Regards,
Jim.


--=_NextPart_000_00EE_01C0823D.09719AF0
Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: 7bit

RE: Session ProblemHello,

We are trying to use the Oreilly servlet package to service requests from a
form that is used to upload files. The form contains buttons, checkboxes,
radio buttons, and several 'file' fields.

When request size is larger than the max size we allow, the constructor

new MultipartParser(req, 10, true, true)

throws an exception, reporting about the size violation.

This is fine but when this happens, we cannot access the values of fields
and buttons that were submitted. This significantly reduce our ability to to
provide the user with a graceful error handling and all we can indicate in
the error message that the total request size was above the limit and any
setting of checkboxes and radio buttons is lost.

Are we missing something ? Any idea how to improve the error handling and to
recover field values ?

Thanks,

Tal

 -Original Message-
From: Mike Campbell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 04, 2001 11:37 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Session Problem


  Craig (or anyone),

   You might want to turn your thinking inside out on how to
   handle this problem
   :-).

  I came in on this discussion thread mid-strand, and have a question.  Your
code snipped on session handling made perfect sense, and really made the
session-handling issue finally click for me.  My question is about
timeouts; where is the timeout value set?

  Thanks




Re: Recovering from oversize upload exception ?

2001-01-20 Thread Joe Laffey

On Fri, 19 Jan 2001, Tal Dayan wrote:

 We are trying to use the Oreilly servlet package to service requests from a
 form that is used to upload files. The form contains buttons, checkboxes,
 radio buttons, and several 'file' fields.

 When request size is larger than the max size we allow, the constructor

 new MultipartParser(req, 10, true, true)

 throws an exception, reporting about the size violation.


I just re-wrote the O'Reilly stuff to throw an exception of my own
creation (SizeTooBigException or something like that).

It is very easy to do... I can sedn you what I did if you want.

IMHO, this should be included in the real package.

Joe Laffey
LAFFEY Computer Imaging
St. Louis, MO
-


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Recovering from oversize upload exception ?

2001-01-20 Thread David Wall

 I just re-wrote the O'Reilly stuff to throw an exception of my own
 creation (SizeTooBigException or something like that).

 It is very easy to do... I can sedn you what I did if you want.

If it allows the servlet to continue and process all of the form fields and
just have the uploaded file rejected, I think we'd all like to see the code.
Since it's a multipart message, you'd have to process all parts and simple
reject the upload of large files.

Also, when I ran that class on JRun some time back, I noted that the
exception was thrown only after all of the data was uploaded to my server.
This seemed to defeat the purpose, which was to reject overly long
transmissions.  Does anybody know if this is just a requirement of servlets,
in that the entire HttpServletRequest must be uploaded and fully stored in
that object before the servlet is called?  That sounds reasonable, but I'm
not sure if that's the case, or whether the servlet has some control over
reading the actual TCP socket so that it can terminate a large upload before
everything is sent to the server.

David


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Recovering from oversize upload exception ?

2001-01-19 Thread Tal Dayan
Title: RE: Session Problem



Hello,

We are 
trying to use the Oreilly servlet package to service requests from a form that 
is used to upload files.The form contains buttons, 
checkboxes, radio buttons, and several 'file' fields.

When 
request sizeis largerthan the max size we allow, the 
constructor

new 
MultipartParser(req, 10, true, true)

throws 
an exception, reporting about the size violation. 

This 
is fine but when this happens, wecannot access the values of 
fields and buttons that were submitted. This 
significantly reduce our ability to to provide the user with a graceful error handling and all we can indicate in 
the error message that the total request size was above the limit and any 
setting of checkboxes and radio buttons is 
lost.

Are we 
missing something ? Any idea how to improve the error handling and to recover 
field values ?

Thanks,
Tal

-Original Message-From: 
Mike Campbell [mailto:[EMAIL PROTECTED]]Sent: Thursday, January 
04, 2001 11:37 AMTo: 
'[EMAIL PROTECTED]'Subject: RE: Session 
Problem

  Craig (or anyone), 
   You might want to turn your thinking inside out on how to 
   handle this problem  
  :-). 
  I came in on this discussion thread mid-strand, and have a 
  question. Your code snipped on session handling made perfect sense, and 
  really made the session-handling issue finally "click" for me. My 
  question is about timeouts; where is the timeout value set?
  Thanks