Hi Guys,
Not explicity Struts related but this error is happening in my Struts Action and
someone may have come across it..
Basically I am using Commons File Uploader.
If I post a file upload to Tomcat directly, e.g http://server:8080/upload.do it works
fine
If I post a file through our IIS
Hi Kannan
Just donne this on a Windows machine ;-) Here a hint for your Action...
snip
...
FormFile file = (FormFile)dynaForm.get(theFile);
String fileName = file.getFileName();
String filePath = E:/apps/webapp/MyApplication/WEB-INF/uploads/;
File newPath = new File(filePath);
newPath.mkdirs();
Hi All!
I'm using struts 1.1 , i'm creating a application based on struts
commons-upload ,I'm following
the struts upload example...
I would like to upload a file into a perticular directory..
/webapp
/MyApplication
/WEB-INF
/uploads/**
). The FormFile
does not contain the actual uploaded data, just the name of the file it was
saved in.
--
Martin Cooper
- Original Message -
From: Jonathan Asbell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 10, 2001 11:16 PM
Subject: Re: uploading file requires immediate serialization
Cooper [EMAIL PROTECTED] on
06/11/2001 01:55:07 AM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED], Jonathan Asbell
[EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject: Re: uploading file requires immediate serialization location?
String parameters are not written
: David Hay/Lex/Lexmark)
Subject: Re: uploading file requires immediate serialization location?
String parameters are not written to a file. Only the bodies of file upload
parts are written to disk, and each one to a separate file. The files are
written as the input stream (i.e. the request
.
-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 11, 2001 5:45 PM
To: [EMAIL PROTECTED]
Subject: Re: uploading file requires immediate serialization location?
I don't know what would happen. In particular, I don't know what the
browser would submit
[EMAIL PROTECTED]
Sent: Sunday, June 10, 2001 5:47 AM
Subject: Re: uploading file requires immediate serialization location?
Great explanation Martin. Thank you. So what you really have said is that
the stream contents gets turned into a FormFile object. Ok. Now the big
question. You know
:01 PM
Subject: Re: uploading file requires immediate serialization location?
Good question. What you are really asking is what does the html:file
tag
do?.
Struts will generate an input type=file ... tag, where the value of
the
'name' attribute is taken from the 'property' attribute of your
PROTECTED]
Sent: Monday, June 11, 2001 1:23 AM
Subject: Re: uploading file requires immediate serialization location?
Yes, I think you've got it. Just to be clear, though, when you say we
need
to examine the sections in the header ..., the we here is Struts - you
don't need to do anything in your
Cooper
- Original Message -
From: Jonathan Asbell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 10, 2001 10:48 PM
Subject: Re: uploading file requires immediate serialization location?
So do you simultaneously write to a file while reading a String parameter
when you
Message -
From: Martin Cooper [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Jonathan Asbell [EMAIL PROTECTED]
Sent: Monday, June 11, 2001 1:55 AM
Subject: Re: uploading file requires immediate serialization location?
String parameters are not written to a file. Only the bodies of file
upload
parts
Hello all.
I am just trying to understand an aspect of a
multipart request. When you submit after using an input of type "file", do
you have to provide an immediate location for the file to be serialized to, or
can you store it in a java object (in a bean's field) as a binary object until
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 09, 2001 6:39 AM
Subject: uploading file requires immediate serialization location?
Hello all.
I am just trying to understand an aspect of a multipart request. When
you submit after using an input of type file, do you have to provide
the ActionForm
save (and validate) the binary data sent via input type file.
- Original Message -
From: Martin Cooper [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Jonathan Asbell [EMAIL PROTECTED]
Sent: Saturday, June 09, 2001 10:55 PM
Subject: Re: uploading file requires immediate serialization location
implementation
did this, but it was changed to use files because of potential memory
problems with large uploads.
Hope this helps.
--
Martin Cooper
- Original Message -
From: Jonathan Asbell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 09, 2001 8:11 PM
Subject: Re: uploading file
16 matches
Mail list logo