After a little more testing it appears file uploads ARE actually working, but only for small files. Files any larger than a few Kbytes results in a 'Cannot find server' error being displayed as soon as the 'upload' button is pressed.
Pressing 'refresh' on the browser then forces this form to be resubmitted which is when the 'part' object appears as null.
I thought this may be due to the max-upload-size flag being incorrectly set in cocoons' web.xml but it is set to:
<init-param> <param-name>upload-max-size</param-name> <param-value>10000000</param-value> </init-param>
i.e. 10Mbytes. More than enough for the files I am trying to upload.
Can anyone shed some light on why this is failing, and why the rather bazaar 'Cannot find server' error message is displayed.
I am at my wits end!
Hmm, this should result in an error message in your servlet container with a stack trace. That would save loads of time.
Geoff
---------- Original Message ----------- From: Geoff Howard <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Sent: Tue, 21 Oct 2003 08:54:39 -0400 Subject: Re: File uploads not working on Linux
Paul Bowler wrote:
Yep. The configurations are identical as they come from the same build process.
Did you double check? The reason I'm asking is that if your XP is local and allow-uploads are not set, uploads may appear to work under some circumstances because the file is local. The other thing is to make sure the enctype of the form is set correctly. If you have the samples running on the linux box, does the upload sample work?
Also, do you see any errors in Cocoon's logs? If not, you may want to set your loglevel to DEBUG (it's much higher in 2.1) and see if there are any related messages.
Geoff
P.S. I am using cocoon 2.1.
-- Paul Bowler Aventix Associates Ltd
---------- Original Message ----------- From: Geoff Howard <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Sent: Tue, 21 Oct 2003 08:13:53 -0400 Subject: Re: File uploads not working on Linux
Paul Bowler wrote:
My cocoon application works fine using Jetty on Win XP, but as soon as I move it to the Linux production box
(using
the same version of cocoon and Jetty with identical configurations) my FileUpload action fails.
The code to get the File from the request object is:
Request request = ObjectModelHelper.getRequest(objectModel); Part part = (Part) request.get("filename");
On XP the 'Part' object is gathered correctly. On Linux it is null.
Is allow-uploads set correctly in web.xml on the linux box?
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
------- End of Original Message -------
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
