Hi,
Is there any size restriction in uploading any file using the FormFile?
If there are any restrictions in file upload, what should be the maximum
file size that can be uploaded?
Are there any other ways of using FormFile and uploading files as large as
800MB - 1GB?
Thanks in advance.
Thanks
At 3:53 PM +0530 3/19/04, Badri wrote:
Hi,
Is there any size restriction in uploading any file using the FormFile?
If there are any restrictions in file upload, what should be the maximum
file size that can be uploaded?
Are there any other ways of using FormFile and uploading files as large
Hi,
I have an app providing file upload capability using the FormFile. It
works great in various browsers on PC and Mac, but it's been brought to
my attention that it fails with Safari.
I tried it out and found that while there are no errors recorded, it
seems that the file data simply doesn't
Hey all,
With a simple JSP page with just one strutshtml:file tag I can easily load a file
into a FormFile object into my Form (with normal getter and setter), and then use an
Action to work with the Form.
But, when trying to make this simple JSP page display 1-N strutshtml:file... tags
, 15 January 2004 05:15
To: [EMAIL PROTECTED]
Subject: FW: Multiple formfile uploads - howto?
Hey all,
With a simple JSP page with just one strutshtml:file tag I can easily load
a file into a FormFile object into my Form (with normal getter and setter),
and then use an Action to work with the Form
] . .
| __ | | . .. .
||/ . .
. . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . .
From: Matthias Wessendorf [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: FormFile NULL when uploading large file
Hi,
I have a problem when uploading large file using
FormFile. It works fine with modest sized file. But
when the file size goes to 1GB, the FormFile returned
from PropertyUtils.getSimpleProperty(...) is null.
Does anyone know the reason behind this? Is there any
file size limit with FormFile
-Original Message-
From: Ling Wu [mailto:[EMAIL PROTECTED]
Sent: Friday, January 02, 2004 7:44 PM
To: [EMAIL PROTECTED]
Subject: FormFile NULL when uploading large file
Hi,
I have a problem when uploading large file using
FormFile. It works fine with modest sized file. But
when the file size goes
column) it does
not work. I'm sure that i have to use the setBlob() method of the PreparedStatement,
however, my dilemma is that I cannot find a way to convert my file from FormFile
format to sql Blob format. Does anybody know how to do this as I've looked everywhere
and haven't come up
-Original Message-
From: Claire Wall [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 23, 2003 8:44 AM
To: Struts Users Mailing List
Subject: converting a FormFile to a Blob object
hi,
I have a jsp page which uploads a file to a database. I have no problems storing the
file in an SQLServer
PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, December 23, 2003 9:43 AM
Subject: converting a FormFile to a Blob object
hi,
I have a jsp page which uploads a file to a database. I have no problems
storing the file in an SQLServer or MySQL database by using
/oracle8/java.815/a64685/
oraext4.htm#1043351
http://www.csee.umbc.edu/help/oracle8/java.815/a64685/samapp2.htm
Then, getting an InputStream from the FormFile and writing the
contents to the database via blob.getBinaryOutputStream() is
just routine. That's how we do it, at least, and it works
. We've tested it with image files, Word, Excel, PDF, etc. The
VO being passed in has a FormFile field DataFile, and a bunch of other
fields for name, type, etc.
I had to turn autocommit off to get this to work. On another project I did
something similar for CLOBS, but the transaction was handled
Mailing List
Subject: Re: converting a FormFile to a Blob object
Am Dienstag, 23. Dezember 2003 15:43 schrieb Claire Wall:
hi,
Oracle is different from other databases when it comes to LOBs
due to the LOB locator concept. IIRC you have to use the Oracle JDBC
extensions for that (oracle.jdbc.*). Some
cheers!
i got it fixed now :) that one was causing me major headaches.
- Original Message -
From: Nicholson, Robb [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, December 23, 2003 4:10 PM
Subject: RE: converting a FormFile to a Blob object
You have
if(DriverObject.getName()==org.gjt.mm.mysql.Driver) perform mySQLLogic;
Is this what you're looking for??
Martin
- Original Message -
From: Claire Wall [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, December 23, 2003 9:43 AM
Subject: converting a FormFile
Am Dienstag, 23. Dezember 2003 17:12 schrieb Ebersole, Steven:
FWIW, that approach will work as long as the data is not larger then
the limit (which escapes me at the moment, but I believe its
something like 4K).
No? Admitting we didn't actually test with file sizes beyond 150MB.
-- Chris.
to torque up to 1.5 GB Ram on my box so JDeveloper would run in an
expeditious manner..
- Original Message -
From: Claire Wall [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, December 23, 2003 9:43 AM
Subject: converting a FormFile to a Blob object
is what the original poster was referring
to?
-Original Message-
From: Christian Bollmeyer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 23, 2003 12:01 PM
To: Struts Users Mailing List
Subject: Re: converting a FormFile to a Blob object
Am Dienstag, 23. Dezember 2003 17:12 schrieb
: Re: converting a FormFile to a Blob object
Martin,
Does JDeveloper work with any database or just with Oracle ?
Marcus
Em Ter, 2003-12-23 s 18:53, Martin Gainty escreveu:
1)you're going to have to download and install JDeveloper
http://otn.oracle.com/software/products/jdev/index.html
a FormFile to a Blob object
Martin,
Does JDeveloper work with any database or just with Oracle ?
Marcus
Em Ter, 2003-12-23 s 18:53, Martin Gainty escreveu:
1)you're going to have to download and install JDeveloper
http://otn.oracle.com/software/products/jdev/index.html
Ben,
Thanks for the code. I'm implementing it now.
-Dan
-Original Message-
From: Ben Janes [mailto:[EMAIL PROTECTED]
Sent: Friday, December 19, 2003 12:49 AM
To: Struts Users Mailing List
Subject: RE: BUG!!! FormFile
Hi Dan,
The bug itself is in PropertyUtils.java, which
:
|
| Subject: RE: BUG!!! FormFile
!!! FormFile
HI Dan,
That would make sense, in my browsered enlightenment I
never use IE, only Opera 7.2..
Anyway, I wrote a work around in the PropertyUtils
class and now it all works fine... Same thing I
had wit mime types, IE: image/pjpeg Opera image/jpeg :
you tell me
Mvh
Benjamin A. Janes
... (Not neat
but it works - no time to do it nicely)
My code is here: Is a basic details updating form, however as you can see the user can
upload a
FormFile, property photo. To geth the Class Photograph version, they need to call
getPhotograph,
which will if photo has arrived etc... create
com.meganexus.networking.struts.form.ChangeContactForm.setPhoto(org.apache.struts.upload.FormFile)
params:interface org.apache.struts.upload.FormFile,value.getClass():class
java.lang.String
So as you can see, the program expects a FormFile parameter, but gets a String
Major error I
think
// Retrieve the property setter
Did you remember to make it a multipart form???
(And use input type=file in the page?)
-Original Message-
From: Ben Janes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 17 December 2003 17:28
To: [EMAIL PROTECTED]
Subject: BUG!!! FormFile
Hi
Further to my other mail I have tracked
]
|
| cc:
|
| Subject: RE: BUG!!! FormFile
Hmmm. Strange.
I dont get that problem in my apps.
What struts version are you using?
-Original Message-
From: Ben Janes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 17 December 2003 17:41
To: Struts Users Mailing List
Subject: RE: BUG!!! FormFile
Yes,
as it works perfecrtly as long
Struts 1.1
Do you want more code, such as JSP / ActionForm etc
Mvh
Benjamin A. Janes
BLUEWAVE SVERIGE
M. +46 (0)40-631 1068
F. +46 (0)40 -631 10 50
F. +46 (0)46-540 03 50
Drottninggatan 18,
S-211 49 Malmö,
Sweden
I have the same problem but ONLY with Opera 7.2x
I'm using Struts 1.1 and with Opera 7.1 everything
worked fine. The formFile field could be left blank.
When I upgraded to 7.2 it began to throw a argument
type mismatch when the formFile field was left blank.
Could this be the source of your
Hi
I have a problem with FormFile, in that when it has no file entered it throws an error:
I belive this is the cause of the error:
15 Dec 2003 13:21:10 - DEBUG [Thread-2] (BeanUtils.java:873) -
setProperty([EMAIL PROTECTED], photo, [])
15 Dec 2003 13:21:10 - DEBUG [Thread-2] (ConvertUtils.java
Is
html:file property=photo/
within any iterate/loop ?
-Original Message-
From: Ben Janes [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 1:22 PM
To: [EMAIL PROTECTED]
Subject: Problem with FormFile
Hi
I have a problem with FormFile, in that when it has no file entered
]
t.com cc:
Subject: RE: Problem with FormFile
:
Subject: RE: Problem with FormFile
Hi,
I am using FormFile and after it is validated it must be displayed on the
next JSP. However, the field is blank. When I look at the source in IE6, I
see the file name without the directory. But even that is not displayed.
Any thoughts?
S P
On Mon, 1 Dec 2003, Sharmila Pandith wrote:
Hi,
I am using FormFile and after it is validated it must be displayed on the
next JSP. However, the field is blank. When I look at the source in IE6, I
see the file name without the directory. But even that is not displayed.
Any thoughts?
Yes
Thanks, that was helpful.
-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 1:30 PM
To: Struts Users Mailing List
Subject: Re: FormFile not re-populated
On Mon, 1 Dec 2003, Sharmila Pandith wrote:
Hi,
I am using FormFile and after
were uploaded. My problem was: how do you detect if files were
uploaded? I chose to examine my ActionForm's FormFile fields and count the
total bytes. IF it's zero, nothing was uploaded so I won't show the
reminder to re-attach the files.
Does anyone have a better method for dealing with losing
and the user wont appreciate having to
upload them again (and again and again (Ive noticed users always seem to
have a knack for entering invalid data!))
I have the setter in the ActionForm add the FormFile to a collection.
On return to the page (due to either a validation error or the need to
upload
So when you want to upload a file, the FormBean should have a FormFile
member
How do I get DiskFile from FormFile??
Can I just declare a member DiskFile in the form bean and it will give me a
disk file?
TIA,
Pritpal Dhaliwal
, Pritpal (HQP)
wrote:
So when you want to upload a file, the FormBean should have a FormFile
member
How do I get DiskFile from FormFile??
Can I just declare a member DiskFile in the form bean and it will give
me a
disk file?
TIA,
Pritpal Dhaliwal
Hi
I am using the org.apache.struts.upload.FormFile.
Now i want to validate wheather a file path entered by user is valid or not.
Thanks and Regards
Deepak.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
I've set the scope of my form to 'session' to support a wizard process.
The form defines a property of type org.apache.struts.upload.FormFile. This
work fine until I set 'validate = true' on my action mapping. It appears
that
([EMAIL PROTECTED])
P.S.: We figured that Blobs coming from MySQL are actually
ByteArrayInputStream thus having a reset() implemented. However, as we tried
to convert data coming from struts FormFile to ByteArrayInputStream
ourselves, it got corrupted
Ralf Hauser wrote:
Hi,
we use the html:file to upload also large attachments into a web-mail
application.
First we put it into the database, but immediately thereafter, we would like
to send it off to multiple recipients via encrypted mail.
We get a Bad File Descriptor when trying to access the
[EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, October 03, 2003 3:11 PM
Subject: Re: how to read uploaded FormFile InputStream multiple times?
Ralf Hauser wrote:
Hi,
we use the html:file to upload also large attachments into a web-mail
application.
First we put
Hi all,
I have an ActionForm used for fileupload that has an attribute of type
FormFile, that become null after a file being uploaded and on the failover
machine in our cluster environment it become null and throw a
NullpointerException. Does anyone know how this can be fix?
Thanks,
--danny
PROTECTED]
Sent: Wednesday, September 17, 2003 8:29 AM
Subject: Fail over: ActionForm's FormFile attribute is null
.(Weblogic8.1 cluster)...
Hi all,
I have an ActionForm used for fileupload that has an attribute of type
FormFile, that become null after a file being uploaded and on the failover
in the session
that has the FormFile attribute, the attribute is null and the
NullpointerException being thrown. Is this because the DiskFile class that
implement the FormFile interface is not serializable. If this is the case
what do I need to do?
Thanks,
--danny
-Original Message-
From
To: 'Struts Users Mailing List'
Subject: RE: Fail over: ActionForm's FormFile attribute is null
(Weblogic8.1 cluster)...
Daniel,
I wasn't responsible for setting up the environment but here is what
happens. When I finish uploading the file, we take down the target machine,
that proccess the request
I have a Action Form that contains a FormFile object that holds the uploaded
file for an image.
When the container trys to serialize my form an NotSerializableException is
being thrown.
I have looked at the source code and found the FormFile's baseObject
DiskFile does not implement
:-(
-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED]
Sent: Thursday, 31 July 2003 23:01
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: How to rename file in FormFile in struts 1.1 final release
Same thing happened to me too. There is going to be a lot of debugging
Whats the deal with
org.apache.struts.upload.CommonsMultipartRequestHandler.CommonsFormFile
being immutable?
Its broken my (production) code that was working with struts 1.1 b1 and
relied on using setFileName() :-(
What is the rationale for the FormFile interface still having these methods
when
Hi,
I'm currently working in a simple upload filter html:file property=xxx /
+ ActionForm + Action...regular stuff.
The problem I'm having is that when I ask for the ContentType of a DTD or an
XSL file, I get text/xml as their ContentType instead of text/xsl, or
application/xml-dtd, or anything
Aclaratory:
I have the FormFile in the corresponding ActionForm class...and there I
check its ContentType to see if the uploading should be allowed or not
(because it has to be certain type of files).
Thanks.
-Mensaje original-
De: Fernando Hernandez [mailto:[EMAIL PROTECTED]
Enviado
Subject: RE: ContentType + FormFile
07/24/03
I'm having problems using a DynaValidatorForm object and FormFile
objects. The following seems to work fine when using Safari but crashes
with the following error when using Mozilla and IE:
org.apache.commons.beanutils.ConversionException:
Cannot assign value of type 'java.lang.String
How do you get the directory of a FormFile that has been uploaded? There is
no
method to retrieve the directory, only the name of the file. I need the full
path.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
. I am wondering if combining an upload file field with a jsp
form containing a dozen other fields is a problem?
In my add ActionForm I added:
private FormFile linkFile = null;
public FormFile getLinkFile() {
return linkFile;}
public void setLinkFile(FormFile linkFile) {
this.linkFile
into an existing add action in my application.
(Struts 1.1b3) My new upload action and this add action use different
ActionForms. I am wondering if combining an upload file field with a jsp
form containing a dozen other fields is a problem?
In my add ActionForm I added:
private FormFile linkFile
No, I forgot that! I made very sure to *not* forget that the first time
around, but alas, it slipped my mind this time. It works fine now. Thanks
a lot Stephen.
Susan
On 02/28/2003 10:11:39 AM Stephen Smithstone wrote:
have u got the encrpt line in your jsp form ?? or what ever it is
On
no problem susan i make the same mistake on several occasions
On Friday 28 February 2003 3:17 pm, Susan Bradeen wrote:
No, I forgot that! I made very sure to *not* forget that the first time
around, but alas, it slipped my mind this time. It works fine now. Thanks
a lot Stephen.
Susan
On
In searching the archives, it appears that, by deliberate design for
security reasons, the FormFile field value cannot be repopulated after
validation using the methods typical to other form fields. The jsp page
source code shows a value for the field,
input type=file name=linkFile
value
://jakarta.apache.org/struts/
-Original Message-
From: Susan Bradeen [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 2:12 PM
To: [EMAIL PROTECTED]
Subject: Repopulating FormFile field after form validation fails.
In searching the archives, it appears that, by deliberate design
Objects. The problem that I am facing is finding out what kind of
Object uploaded files are translated to. I know about the FormFile.. but it
is an interface and (obviously) can't instantiate that. So what object do I
need to prepopulate my lazyList with to allow the uploaded files objects to
be put
you never add element into your collection and you try to access an
indefined index .
- Original Message -
From: Brandon Goodin [EMAIL PROTECTED]
To: Struts User List [EMAIL PROTECTED]
Sent: Wednesday, January 29, 2003 9:02 PM
Subject: FormFile question
I have a page that uploads
-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws
-Original Message-
From: Brandon Goodin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 1:02 PM
To: Struts User List
Subject: FormFile question
I have a page that uploads multiple files. I want to place these files
I think my solution is much simpler. Instead of trying to place the FormFile
directly into the colleciton I need to create a bean that will wrap the
FormFile and hold the value as a property (setter/getter). I'll try that and
post my findings. I have never used a property name that ended
Goodin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 1:27 PM
To: Struts Users Mailing List
Subject: RE: FormFile question
I think my solution is much simpler. Instead of trying to place the FormFile
directly into the colleciton I need to create a bean that will wrap the
FormFile
I am using a file to upload.
The file has a one required field. and a file atachment.
If I get an error on the required field The form field does not reset to
file name before the submit.
Is there any solution to this problem.
Vipul
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
FormFile - OK now
It is al right now!
Huy
--- Huynh Ngoc Huy [EMAIL PROTECTED] wrote:
Hi all,
How can we store InputStream from FormFile into
another InputStream to use later?
Thanks in advance,
Huy
__
Do you Yahoo
Hello,
in a form, i get a FormFile object.
This work fine (i display the ContentType, etc).
The file uploaded is a image type file (image/jpg or image/gif, this is
verify in the form bean associate).
I would like to populate a bean with can display in JSP.
For exemple, i have my class
Hi all,
How can we store InputStream from FormFile into
another InputStream to use later?
Thanks in advance,
Huy
__
Do you Yahoo!?
Yahoo! Mail Plus Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail
It is al right now!
Huy
--- Huynh Ngoc Huy [EMAIL PROTECTED] wrote:
Hi all,
How can we store InputStream from FormFile into
another InputStream to use later?
Thanks in advance,
Huy
__
Do you Yahoo!?
Yahoo! Mail Plus
Hi,
I use dynamic forms in my projects; but this time I want to upload
A file and when I use form-property name=myFile
type=org.apache.struts.upload.FormFile /
An error occurs that says that cannot assign String to FormFile.
How can I use dynamic form with this kind of objects?
Thanks, reza.
On Mon, 18 Nov 2002, Reza Aliakbari wrote:
Hi,
I use dynamic forms in my projects; but this time I want to upload
A file and when I use form-property name=myFile
type=org.apache.struts.upload.FormFile /
An error occurs that says that cannot assign String to FormFile.
How can I use
Hello,
I have some corrupted file problem with Struts, in upload and in download.
1- Upload : I use the FormFile object and the html:file tag to import
file from the client browser. Things works just fine with almost every files
but I have hit some files ( like tiff and pdf) that get corrupted
On Wed, 13 Nov 2002, Hugo Villeneuve wrote:
Hello,
I have some corrupted file problem with Struts, in upload and in download.
1- Upload : I use the FormFile object and the html:file tag to import
file from the client browser. Things works just fine with almost every files
but I have
Hi All
I've searched the list for this issue, and only found one thread that was
related (pre-setting the file value), but didn't really address this issue.
I have a form with a file input as well as other inputs (assume they are
metadata associated with the file).
If the user enters a path to
I don't know of any browser which actually does anything with the
value field of an input type file. The fact that the html:file
tag puts a value in is just a side effect of FileTag extending
BaseFieldTag.
Sorry. This isn't a Struts thing, it's a browser thing. Try making
a static HTML
11, 2002 2:39 PM
To: Struts Users Mailing List
Subject: Re: FormFile/DiskFile and form validation/redisplay
during file
uploa d
I don't know of any browser which actually does anything with the
value field of an input type file. The fact that the html:file
tag puts a value in is just
Charles,
Also, it does not appear that the original filename is guaranteed to be
supplied either
FormFile has a method getFileName() which returns you the filename (without
any path). Trying to obtain the client's path is not possible from an input
type=file/ tag; because this could lead
Craig,
I use tomcat 4.0.4-B1 and it makes 'strts56829.tmp' files in the
tomcat\work\localhost\[myAppName]\ each time a FormFile is used.
The problem is: this is filling up the harddisk, I cannot programatically
delete them as they are given a random name, thus I cannot identify which
files I
property of type FormFile
Hey gang
I was trying to implement an upload to help Henry Lu get his going, since
I'll need the same functionalty later anyway. I believe I have everything
hooked up correctly, but I get an error 500 when I submit the form. Any
help regarding this would be most appreciated
]
To: struts users [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 2:53 PM
Subject: html:file tag and FormFile
Is there any one who may help me to figure out how to use html:file rag
and FormFile in a ActionForm? I got errors where I tried to use both.
errors
users [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 2:53 PM
Subject: html:file tag and FormFile
Is there any one who may help me to figure out how to use html:file rag
and FormFile in a ActionForm? I got errors where I tried to use both.
errors are:
javax.servlet.ServletException
Is there any one who may help me to figure out how to use html:file rag
and FormFile in a ActionForm? I got errors where I tried to use both.
errors are:
javax.servlet.ServletException: BeanUtils.populate
Root Cause:
java.lang.IllegalArgumentException: argument type mismatch
my JSP file
Hey gang
I was trying to implement an upload to help Henry Lu get his going, since
I'll need the same functionalty later anyway. I believe I have everything
hooked up correctly, but I get an error 500 when I submit the form. Any
help regarding this would be most appreciated by myself, and I'm
in my output
window.
HTH Henry!
Eddie
- Original Message -
From: Henry Lu [EMAIL PROTECTED]
To: struts users [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 2:53 PM
Subject: html:file tag and FormFile
Is there any one who may help me to figure out how to use html:file rag
I set method=post too ... sorry I didn't mention that.
- Original Message -
From: Henry Lu [EMAIL PROTECTED]
To: struts users [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 2:53 PM
Subject: html:file tag and FormFile
Is there any one who may help me to figure out how to use
.
Thanks!
Eddie
- Original Message -
From: Eddie Bush [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 4:00 PM
Subject: Re: html:file tag and FormFile
What does your html:form tag look like, Henry? Be sure you specify
encType=multipart
I've a classic from where users can insert name, last name etc.. and a photo,
everything
is ok but:
1 - the file is uploaded before the form is validated, so may happen one should wait a
couple of minutes before knowing the data inserted is not valid (okok I know that's
not a
struts issue ;)
Hi
I want to be able to pre populate a FormFile in a form bean with a default file for
the user to upload.
How can I do this?
--
Cheers
Tony
-
_
Do You Yahoo
Hi,
I am experiencing a strange problem when we use FormFile to upload a binary
file.
After the upload, the check sum of binary file is changed, even though the
size is still same. But if the file is text file. Every thing seems fine.
The code I used to do the upload is very similar
Hello,
Does anyone have any sample code to take the contents of an uploaded file
and add it as an attachment to an email message? Basically, I'm trying to
load the contents of the FormFile object directtly to a mimeBodyPart object
without writing the data to a temporary file first.
Thanks
Thanks Michael. MimeBodyPart has a constructor that takes InputStream as a
param, so it worked out great.
-Original Message-
From: SCHACHTER,MICHAEL (HP-NewJersey,ex2) [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 05, 2001 11:35 AM
To: '[EMAIL PROTECTED]'
Subject: RE: FormFile
I am trying to upload an image to my local tomcat server. I have created a
bean called ImageUploadForm that contains
FormFile imageFile;
public void setImageFile(FormFile imageFile)
{
this.imageFile = imageFile;
}
public FormFile getImageFile()
{
return imageFile;
}
and a JSP
]
Sent: Wednesday, August 15, 2001 1:44 PM
Subject: FormFile
I am trying to upload an image to my local tomcat server. I have created
a
bean called ImageUploadForm that contains
FormFile imageFile;
public void setImageFile(FormFile imageFile)
{
this.imageFile = imageFile;
}
public FormFile
{
private FormFile file;
public UploadForm() {
}
public void setFile(FormFile file) {
this.file = file;
}
public FormFile getFile() {
return file;
}
}
when I submit this form I receive following exception:
Internal Servlet Error
1 - 100 of 101 matches
Mail list logo