Re: Multiple FormFile Uploads in Struts 1

2011-10-28 Thread JOSE L MARTINEZ-AVIAL
= upload; >> } >> >> public void setFiletoUploadContentType(String uploadContentType[]) { >> this.fileToUploadContentType = uploadContentType; >> } >> >> public void setFiletoUploadFileName(String uploadFileName[]) { >> this.fileToUploadFileName

Re: Multiple FormFile Uploads in Struts 1

2011-10-28 Thread JOSE L MARTINEZ-AVIAL
id setFiletoUploadFileName(String uploadFileName[]) { > this.fileToUploadFileName = uploadFileName; > } > > 2011/10/28 Sekar, Sowmya > > Hi, >> Does anyone have a working solution of multiple formfile uploads? I >> declared the formfile as an arraylist and

Re: Multiple FormFile Uploads in Struts 1

2011-10-28 Thread JOSE L MARTINEZ-AVIAL
, Sowmya > Hi, > Does anyone have a working solution of multiple formfile uploads? I > declared the formfile as an arraylist and indexed the property in the jsp > files. I also changed the setter and getter methods to take the index and > formfile object. However, when I save the

Multiple FormFile Uploads in Struts 1

2011-10-28 Thread Sekar, Sowmya
Hi, Does anyone have a working solution of multiple formfile uploads? I declared the formfile as an arraylist and indexed the property in the jsp files. I also changed the setter and getter methods to take the index and formfile object. However, when I save the form, it throws "argument

Re: uploading with FormFile problem

2009-01-27 Thread Nils-Helge Garli Hegvik
Could you filter on the extension of the file name instead? Nils-H On Tue, Jan 27, 2009 at 6:28 PM, Tatiyana Tarabara wrote: > Hi, > I am facing some problems while uploading a file using Struts' FormFile > object. I want to allow user to upload only .pdf files. For that I am &

uploading with FormFile problem

2009-01-27 Thread Tatiyana Tarabara
Hi, I am facing some problems while uploading a file using Struts' FormFile object. I want to allow user to upload only .pdf files. For that I am comparing the ContentType of the file being uploaded using FormFile's getContentType() method. The problem is , when users uploading their

RE: get file path from FormFile

2008-12-17 Thread Givler, Eric
, why copy it again, especially if it's big - it just adds another step. -Original Message- From: Dave Newton [mailto:newton.d...@yahoo.com] Sent: Wednesday, December 17, 2008 12:52 PM To: Struts Users Mailing List Subject: RE: get file path from FormFile It hardly seems necessary

RE: get file path from FormFile

2008-12-17 Thread Dave Newton
It hardly seems necessary to make a framework change when you can just write the file. --- On Wed, 12/17/08, Givler, Eric wrote: > From: Givler, Eric > Subject: RE: get file path from FormFile > To: "'Struts Users Mailing List'" > Date: Wednesday, December

RE: get file path from FormFile

2008-12-17 Thread Givler, Eric
Would there be an issue with modifying the controller settings and setting the memFileSize artifically low so the file is always written to disk, then gaining access to the filename via reflection? // create in package org.apache.struts.upload public static String getFilePath( FormFile file

[OT] Re: Fwd: export file data using formFile

2008-12-17 Thread Dave Newton
--- On Wed, 12/17/08, elyes sallem wrote: > String mimetype = context.getMimeType(filePath.replaceAll("/", "//")); You shouldn't need to do that. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional

Re: Fwd: export file data using formFile

2008-12-17 Thread elyes sallem
be coool ..., in fact i didn't that before download or upload it is new dev , that is why ...(all we begin by this step, it was the case for you i suppose...), furtheremore, i resolved it => (so don't think that i'm waiting response ...) those who are interested , here is the code i added at the b

Re: Fwd: export file data using formFile

2008-12-17 Thread Robert Graf-Waczenski
elyes sallem wrote: it forwarded me to page with "unreadable data" comapred to the first example, you omit the resp.setHeader("Content-Disposition", ... Sorry if this sounds a bit harsh, but the people on this list are not here to solve any single Java or Servlet-API related mystery for you

Re: Fwd: export file data using formFile

2008-12-16 Thread elyes sallem
it forwarded me to page with "unreadable data" comapred to the first example, you omit the resp.setHeader("Content-Disposition", ... here is the code ,i have the export method in a dispatch action : public ActionForward exportSelectedIntaff(ActionMapping mapping, ActionForm form, H

Re: Fwd: export file data using formFile

2008-12-16 Thread Robert Graf-Waczenski
Hi Elyes, something like this here should work: OutputStream out = resp.getOutputStream(); FileInputStream fileStream = new FileInputStream("path/to/your/excelFile.xls"); int bufferLen = 1024 * 8;// 8 KB byte[] buffer = new byte[bufferLen]; while (tru

Re: get file path from FormFile

2008-12-16 Thread elyes sallem
o avoid any confusion, > > all i want to do is that : > > 1- i have data in a file, so through the formfile, i get the file path > (now > > i make the test locally, but after it will be deployed on a server) and i > > load this data in a database, depending on the file'

Re: Fwd: export file data using formFile

2008-12-16 Thread elyes sallem
Hello Robert , so assume that i have an excel file on the server and i have a button to download it for the client (of course with a browse dialog) could you show me how develop it , in your example , you call writePDFDataToOutputStream and it is a pdf file which is not my case Thanks Regards Ely

Re: get file path from FormFile

2008-12-16 Thread Nils-Helge Garli Hegvik
provided to you in your previous thread: Stream the file content to the browser. If 3) See 1) and 2) Nils-H On Tue, Dec 16, 2008 at 2:09 PM, elyes sallem wrote: > to avoid any confusion, > all i want to do is that : > 1- i have data in a file, so through the formfile, i get the file path

Re: get file path from FormFile

2008-12-16 Thread Dave Newton
--- On Tue, 12/16/08, elyes sallem wrote: > to avoid any confusion, Too late! > 1- i have data in a file, so through the formfile, i get > the file path (now i make the test locally, but after it > will be deployed on a server) and i load this data in a > database, depending on

Re: get file path from FormFile

2008-12-16 Thread elyes sallem
to avoid any confusion, all i want to do is that : 1- i have data in a file, so through the formfile, i get the file path (now i make the test locally, but after it will be deployed on a server) and i load this data in a database, depending on the file's meta data, and its content 2- i allo

Re: get file path from FormFile

2008-12-16 Thread Nils-Helge Garli Hegvik
t;> after this (so as a constraint, i can't modify the class in >> this jar) > > So... you're *uploading* a file to the server (from the user of the browser > to the web application)??? Then you need to save the FormFile locally and use > *t

Re: get file path from FormFile

2008-12-16 Thread Dave Newton
ile to the server (from the user of the browser to the web application)??? Then you need to save the FormFile locally and use *that* path when you call your library methods. Dave - To unsubscribe, e-mail: user-unsubscr...@strut

Re: get file path from FormFile

2008-12-16 Thread elyes sallem
e user. > > Nils-H > > On Tue, Dec 16, 2008 at 12:24 PM, elyes sallem > wrote: > > Hello, > > after publishing this question, i conclude that it is not possible de get > > back the absolute path from FormFile > > but the problem is that i import a jar file, in

Re: get file path from FormFile

2008-12-16 Thread Robert Graf-Waczenski
ou get *EXACTLY* the behavior you desire. No applet. No fumbling around with FormFile properties. No file upload. Robert elyes sallem wrote: Hello, after publishing this question, i conclude that it is not possible de get back the absolute path from FormFile but the problem is that i import a j

Re: get file path from FormFile

2008-12-16 Thread Dave Newton
--- On Tue, 12/16/08, elyes sallem wrote: > after publishing this question, i conclude that it is not > possible de get back the absolute path from FormFile but > the problem is that i import a jar file, in which i call > a method that accept only path of file so what do you propo

Re: get file path from FormFile

2008-12-16 Thread Nils-Helge Garli Hegvik
be downloaded by the user. Nils-H On Tue, Dec 16, 2008 at 12:24 PM, elyes sallem wrote: > Hello, > after publishing this question, i conclude that it is not possible de get > back the absolute path from FormFile > but the problem is that i import a jar file, in which i call a

get file path from FormFile

2008-12-16 Thread elyes sallem
Hello, after publishing this question, i conclude that it is not possible de get back the absolute path from FormFile but the problem is that i import a jar file, in which i call a method that accept only path of file so what do you propose, i get the inputstream , then i create temporarly a file

Re: Fwd: export file data using formFile

2008-12-15 Thread Oscar Alvarez
I think, you need to put a hiperlink or a button for start your action. Then you need to retrieve the data from the db, generate the csv Stream or File as you wish to call it. Then the only diference between a Servlet.doGet method an Action.execute method is 2 parameters ActionMapping and ActionFor

Re: Fwd: export file data using formFile

2008-12-15 Thread Dave Newton
--- On Mon, 12/15/08, elyes sallem wrote: > do you have an other solution? the html:file doesn't > work for saving a new file Stream the result (a servlet example was given, it's the same for an action-you just return null instead of an ActionForward). The *BROWSER* opens a "save as" dialog box.

Re: Fwd: export file data using formFile

2008-12-15 Thread elyes sallem
2008/12/15 Dave Newton > *boggled* > > --- On Mon, 12/15/08, elyes sallem wrote: > > i used a filechooser class (swing), if any one have an > > others solution, i'm interested here is the code : > > > > String wd = System.getProperty("user.dir"); > > JFileChooser fc = new JFileChooser(wd); > >

Re: Fwd: export file data using formFile

2008-12-15 Thread Dave Newton
*boggled* --- On Mon, 12/15/08, elyes sallem wrote: > i used a filechooser class (swing), if any one have an > others solution, i'm interested here is the code : > > String wd = System.getProperty("user.dir"); > JFileChooser fc = new JFileChooser(wd); > int rc = fc.showDialog(null, "Select Data

Re: Fwd: export file data using formFile

2008-12-15 Thread elyes sallem
i used a filechooser class (swing), if any one have an others solution, i'm interested here is the code : String wd = System.getProperty("user.dir"); JFileChooser fc = new JFileChooser(wd); int rc = fc.showDialog(null, "Select Data File"); if (rc == JFileChooser.APPROVE_OPTION) { File file = fc.g

Re: Fwd: export file data using formFile

2008-12-15 Thread elyes sallem
in fact, i will not do it in a servlet, but in an action (execute method) Regards Elyes 2008/12/15 Robert Graf-Waczenski > Here's an example: > > public class Downloader extends HttpServlet > { > private void doGet(HttpServletRequest req, HttpServletResponse resp) throws > IOException > { >

Re: Fwd: export file data using formFile

2008-12-15 Thread Robert Graf-Waczenski
Here's an example: public class Downloader extends HttpServlet { private void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { resp.setHeader("Pragma", "no-cache"); resp.setHeader("Cache-control", "no-cache"); resp.setIntHeader("Expires", -1);

Re: Fwd: export file data using formFile

2008-12-15 Thread elyes sallem
path* >>>> >>>> >>> Oh, I thought you said "[...] struts tag to export file [...]" >>> >>> >>> >>>> --- On Mon, 12/15/08, elyes sallem wrote: >>>>> >>>>> >>>>>> all i want, is what i

Re: Fwd: export file data using formFile

2008-12-15 Thread elyes sallem
ok, do you have an example? Thanks Regards Elyes 2008/12/15 Dave Newton > --- On Mon, 12/15/08, elyes sallem wrote: > > the problem is that with the html:file you must browse to an > > existant file, but in my case, i wanna browse to a new file, > > and then in the action i will make some trea

Re: Fwd: export file data using formFile

2008-12-15 Thread Robert Graf-Waczenski
--- On Mon, 12/15/08, elyes sallem wrote: all i want, is what is the struts tag to export file [...] FormFile has a getFileName() method. Different browsers submit different values for this: some send the entire path, some just send the file name. Is that also not wha

Re: Fwd: export file data using formFile

2008-12-15 Thread Nils-Helge Garli Hegvik
thought you said "[...] struts tag to export file [...]" >> >> >> --- On Mon, 12/15/08, elyes sallem wrote: >> >>> all i want, is what is the struts tag to export file [...] >> >> FormFile has a getFileName() method. Different browsers submit d

Re: Fwd: export file data using formFile

2008-12-15 Thread Dave Newton
--- On Mon, 12/15/08, elyes sallem wrote: > the problem is that with the html:file you must browse to an > existant file, but in my case, i wanna browse to a new file, > and then in the action i will make some treatment, generate > data and export them to this file That's not how you do that. Y

Re: Fwd: export file data using formFile

2008-12-15 Thread elyes sallem
gt; it is not to export the file content , i want juste get back in the > > action, the *selected file path* > > Oh, I thought you said "[...] struts tag to export file [...]" > > >> --- On Mon, 12/15/08, elyes sallem wrote: > >>> all i want, is what is

Re: Fwd: export file data using formFile

2008-12-15 Thread Dave Newton
l i want, is what is the struts tag to export file [...] FormFile has a getFileName() method. Different browsers submit different values for this: some send the entire path, some just send the file name. Is that also not what you're asking? Dave

Re: Fwd: export file data using formFile

2008-12-15 Thread Robert Graf-Waczenski
There is no reliable way to get the selected file path. This has been discussed a few days ago on this list. Robert elyes sallem wrote: it is not to export the file content , i want juste get back in the action, the *selected file path* 2008/12/15 Dave Newton --- On Mon, 12/15/08, elyes

Re: Fwd: export file data using formFile

2008-12-15 Thread elyes sallem
it is not to export the file content , i want juste get back in the action, the *selected file path* 2008/12/15 Dave Newton > --- On Mon, 12/15/08, elyes sallem wrote: > > all i want, is what is the struts tag to export file [...] > > There is no tag to export a file. > > Dave > > >

Re: Fwd: export file data using formFile

2008-12-15 Thread Dave Newton
--- On Mon, 12/15/08, elyes sallem wrote: > all i want, is what is the struts tag to export file [...] There is no tag to export a file. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands,

Fwd: export file data using formFile

2008-12-15 Thread elyes sallem
Regards Elyes -- Forwarded message -- From: elyes sallem Date: 2008/12/15 Subject: export file data using formFile To: Struts Users Mailing List Hello, i want to use a formfile in jsp page, where once i browse to file , i want to laucnh directly the action, export data to this file (without

export file data using formFile

2008-12-15 Thread elyes sallem
Hello, i want to use a formfile in jsp page, where once i browse to file , i want to laucnh directly the action, export data to this file (without a submit button near the fromfile) how can i make it? Regards Elyes.

How do i get a field value inside a custom Struts Validator, when the field’s type is FormFile?

2008-12-10 Thread Sergio del Amo Caballero
tring(bean,field.getProperty()); However, how do i get the value for a FormFile field? I would like to get the value as a FormFile object. FormFile myFile = (FormFile) // TODO Next i post the involved file's snippets. # struts-config.xml http://jakarta.apache.org/struts/dtds/struts

Struts 1 - using POI and FormFile to read an excel file

2008-05-05 Thread bhaarat Sharma
Hello, I am currently using Struts 1 - FormFile to uplaod various documents. Now I have a requirement to read an excel file as the user uploads it. For this I am using Apache POI. this is how poi reads an excel sheet InputStream myxls = new FileInputStream("workbook.xls")); HSSFW

Re: FormFile to Next Page

2008-03-27 Thread Laurie Harper
Storing the FormFile reference into the request wont help; request attributes are discarded at the end of request processing, so by the time the next page submits the first request has gone away. To keep something from one request available to the next request, you would have to put it into

Re: FormFile to Next Page

2008-03-27 Thread Antonio Petrelli
Wait a moment, maybe I misunderstood. You are writing about "pages", but do they stay in the same HTTP request? If yes, ok, the FormFile is available through the whole request, but it can be read only once (IIRC). Antonio

Re: FormFile to Next Page

2008-03-27 Thread Tom Holmes Jr.
Yes, I thought I mentioned that I could parse it and store it until I need it. However, I don't like to store data like that in a session ... it could be a lot of data. But I could pass it into the request Antonio Petrelli wrote: 2008/3/27, Tom Holmes Jr. <[EMAIL PROTECTED]>: Wel

Re: FormFile to Next Page

2008-03-27 Thread Antonio Petrelli
2008/3/27, Tom Holmes Jr. <[EMAIL PROTECTED]>: > > Well, my use case, I am parsing a CSV file and the first line contains > the header information. > Each column has a header so rather than parse the entire file at > this time, I just grab the first line. > That's all I need to do in that acti

Re: FormFile to Next Page

2008-03-27 Thread Tom Holmes Jr.
o, I still need to hold onto this file until after the second page. That's my use case. Thanks! Tom Antonio Petrelli wrote: 2008/3/27, Tom Holmes Jr. <[EMAIL PROTECTED]>: Ok . maybe what I'll do in thi

Re: FormFile to Next Page

2008-03-27 Thread Antonio Petrelli
2008/3/27, Tom Holmes Jr. <[EMAIL PROTECTED]>: > > Ok . maybe what I'll do in this case is put the FormFile into the > request manually Isn't it easier to parse the FormFile in the action? Antonio

Re: FormFile to Next Page

2008-03-27 Thread Tom Holmes Jr.
Ok . maybe what I'll do in this case is put the FormFile into the request manually, so I can pass it from one page to the next. I'm not so much concerned with the FormFile.getInputStream since I can use FormFile.getFileData to get the byte array data. Thanks! Antonio Petrelli wr

Re: FormFile to Next Page

2008-03-27 Thread Antonio Petrelli
persist this without writing it to a database. You need to parse the input stream as it comes. The reason why the FormFile does not return an input stream at the following request is that the input stream is connected to the previous HTTP request. How you can persist it is a problem of yours, Strut

FormFile to Next Page

2008-03-27 Thread Tom Holmes Jr.
I have found dozens of examples on the Net to use Struts 1 to upload a file using the FormFile object. This works great. However, there is probably a bug in the FormFile since getting the inputStream doesn't seem to work. But using the getFileData to get the byte array does work fine, so

RE: FormFile is not getting populated when using winhttp on Vista

2007-06-26 Thread Meindert
FYI, found a workaround for the struts/FormFile issue. The issue(s) a) Struts doesn't resolve the file when there is Charset information in the Content-Type header for a multipart/form-data post. b) Winhhtp on Vista (dll version 6) adds '; Charset=UTF-8' to the Content-Type The fi

FormFile is not getting populated when using winhttp on Vista

2007-06-22 Thread Meindert
Hi There, I'm setting the header in my VB application without charset property in the Content type; winhttp.SetRequestHeader "Content-Type", "multipart/form-data; boundary=xxx This was using fine and the file was received by struts in the FormFile object But now I'm

Re: FormFile: Catching IllegalArgumentException

2007-06-11 Thread Niall Pemberton
On 6/8/07, Eric Jain <[EMAIL PROTECTED]> wrote: I have a form with a FormFile field, which works great, except that when someone submits a plain string for this field (e.g. a spammer crawling the site and doing random submissions) I get an ugly stack trace logged... I wonder is there a

Re: FormFile: Catching IllegalArgumentException

2007-06-08 Thread Eric Jain
Vincent Lin wrote: Do you have this setting in your form? enctype="multipart/form-data" As mentioned, submissions via the form in the web page work fine. The issue is that if someone bypasses the form and POSTs an (invalid) non-multipart request that puts some random string in the parameter

Re: FormFile: Catching IllegalArgumentException

2007-06-08 Thread Vincent Lin
Do you have this setting in your form? enctype="multipart/form-data" On 6/8/07, Eric Jain <[EMAIL PROTECTED]> wrote: I have a form with a FormFile field, which works great, except that when someone submits a plain string for this field (e.g. a spammer crawling the site

FormFile: Catching IllegalArgumentException

2007-06-08 Thread Eric Jain
I have a form with a FormFile field, which works great, except that when someone submits a plain string for this field (e.g. a spammer crawling the site and doing random submissions) I get an ugly stack trace logged... I wonder is there a way to catch this? 2007-06-08 16:04

Struts-Faces: FormFile

2007-05-05 Thread Rodrigo Pereira
Hi, is it possible to use FormFile with struts-faces integration library? When I set enctype="multipart/form-data" it does not submit my form anymore. Thanks, Rodrigo Pereira - To unsubscribe, e-mail: [EMAIL PROT

Multiple formfile uploads - howto?

2007-02-20 Thread nagesh.kumar
Can any bosy has sample jsp , bean , action To handle this Multiple formfile uploads - howto? = Thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Zip to FormFile

2007-01-16 Thread Sahil Gupta
Hi, I have an Action that picks up a file from a JSP and does the processing that is required. This is working fine. The code to pick up file is resumeZipDir = (FormFile) Form.get("resumeZipDir"); Now I am calling the same Action from another Action, and I want the zip file I

Re: FormFile field value not getting retained

2006-10-25 Thread Laurie Harper
Puneet Lakhina wrote: Hi, This is the first time I am using a FormFile. I have a few other fields in my form along with the field. The problem is when some validation fails, the value in the text field of the file control gets lost i.e. the user has to select the file again. Is this normal

Re: 2 different FormFile size restrictions

2006-10-25 Thread Laurie Harper
Marcolino wrote: Hi, a short question: I have a /createShortEntry and a /createLargeEntry. I want to limit filesize for /createShortEntry to 250kb and for /createLargeEntry to 350kb. is this possible in a simple way? Thanks, Markus No, you can only set a max upload size for the application

FormFile field value not getting retained

2006-10-25 Thread Puneet Lakhina
Hi, This is the first time I am using a FormFile. I have a few other fields in my form along with the field. The problem is when some validation fails, the value in the text field of the file control gets lost i.e. the user has to select the file again. Is this normal behavior or does it have to

Re: How to show downloadable link using FormFile class .

2006-10-25 Thread Anuraag Shinde
gt; automatically hand this stream to the browser. > > - Add an action-mapping to the action > > > > HTH, > > -ed > > > > On 10/25/06, Anuraag Shinde <[EMAIL PROTECTED]> wrote: > > > Hi, > > > In my application i need to allow user to uploa

Re: How to show downloadable link using FormFile class .

2006-10-25 Thread Ed Griebel
allow user to upload files, View list of > > uploaded files and download a specific file. > > I have sucessfully configured my application to upload the file using > > FormFile as type for my file field. > > Now the problem is how to Get data from database and show a down

Re: How to show downloadable link using FormFile class .

2006-10-25 Thread Anuraag Shinde
> I have sucessfully configured my application to upload the file using > FormFile as type for my file field. > Now the problem is how to Get data from database and show a downloadable > link. > > There are n number of examples for file upload but none of them cover the >

Re: How to show downloadable link using FormFile class .

2006-10-25 Thread Ed Griebel
ng to the action HTH, -ed On 10/25/06, Anuraag Shinde <[EMAIL PROTECTED]> wrote: Hi, In my application i need to allow user to upload files, View list of uploaded files and download a specific file. I have sucessfully configured my application to upload the file using FormFile as type f

How to show downloadable link using FormFile class .

2006-10-25 Thread Anuraag Shinde
Hi, In my application i need to allow user to upload files, View list of uploaded files and download a specific file. I have sucessfully configured my application to upload the file using FormFile as type for my file field. Now the problem is how to Get data from database and show a downloadable

RE: Re: FormFile getPath() ?

2006-10-25 Thread Givler, Eric
Can you elaborate on this some more? I followed through the example here: http://www.roseindia.net/struts/strutsfileupload.shtml. My ActionForm has a property of FormFile called myFile. Once I'm inside the Action class, the file upload has already taken place (part of processPop

2 different FormFile size restrictions

2006-10-24 Thread Marcolino
Hi, a short question: I have a /createShortEntry and a /createLargeEntry. I want to limit filesize for /createShortEntry to 250kb and for /createLargeEntry to 350kb. is this possible in a simple way? Thanks, Markus - To un

Re: Re: FormFile getPath() ?

2006-10-23 Thread Martin Gainty
AIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, October 23, 2006 2:19 PM Subject: RE: Re: FormFile getPath() ? Did you ever get a solution to this? The filename from FormFile.getFileName() is the client file name, right? My requirement is that the uploads can be up t

RE: Re: FormFile getPath() ?

2006-10-23 Thread Givler, Eric
virus scanner against it. So creating another copy of the file is an extra step for me as well. It appears that CommonsMultipartRequestHandler processes the request and adds FormFile elements for each file that is found to a Hash table, but these elements are of type CommonsFile, and don't

RE: Re: FormFile getPath() ?

2006-10-23 Thread Givler, Eric
virus scanner against it. So creating another copy of the file is an extra step for me as well. -Original Message- From: Laurent Duparchy [mailto:[EMAIL PROTECTED] Sent: Monday, October 02, 2006 4:11 AM To: Struts Users Mailing List Subject: Re: FormFile getPath() ? Hi, thanks but the

Re: FormFile getPath() ?

2006-10-02 Thread Laurent Duparchy
Hi, thanks but the reply but I think it does exactly what I want to avoid (and what I'm currenlty doing) : Create a second temp file by reading the inputsream into a new FileOutputStream. I'm looking into the possibility to get the filepath (when exist) of the FormFile, not the

Re: FormFile getPath() ?

2006-09-29 Thread Mark Shifman
; FormFile file = theForm.getTheFile(); String fileName = file.getFileName(); try { String filePath = tempdir + "/" + fileName; //retrieve the file data InputStream stream = file.getInputStream();

FormFile getPath() ?

2006-09-29 Thread Laurent Duparchy
Hi, My front-end program upload files and then forward the file path to another server side program that handle them. The problem is that I have to read the FormFile data and store it into another temp file. It would increase performances this data duplication and have access directly to

Re: FormFile arrays

2006-09-13 Thread Jeremiah Johnson
class like this: public class FormFileWrapper { private FormFile file; public FormFile getFile() { return file; } public void setFile(FormFile file) { this.file = (FormFile)file; } } Created array of of FormFileWrapper called doc[] (and added the corrsponding

RE: FormFile arrays

2006-09-13 Thread Raghuveer
try nested tags for file object in jsp and array of formfile for getter and setters mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 6:23 AM To: Struts Users Mailing List Subject: Re: FormFile arrays David Grundberg wrote: > You are right about the jakarta commons fileupload

Re: FormFile arrays

2006-09-12 Thread Jeremiah Johnson
r who is using the application. So I want to store this in an array (FormFile[]) in order to have N number of files uploaded. When I try to use tags in an iterate loop (with indexed="true") I get an error about requiring property attribute. There's isn't a good way of doi

Re: FormFile arrays

2006-09-12 Thread Laurie Harper
Jeremiah Johnson wrote: I would like to upload multiple files on a single web page by having multiple elements. The exact number of these are different depending on the user who is using the application. So I want to store this in an array (FormFile[]) in order to have N number of files

Re: FormFile arrays

2006-09-12 Thread David Grundberg
ant to store this in an array (FormFile[]) in order to have N number of files uploaded. When I try to use tags in an iterate loop (with indexed="true") I get an error about requiring property attribute. There's isn't a good way of doing that so I just rendered the the HTML wi

FormFile arrays

2006-09-12 Thread Jeremiah Johnson
I would like to upload multiple files on a single web page by having multiple elements. The exact number of these are different depending on the user who is using the application. So I want to store this in an array (FormFile[]) in order to have N number of files uploaded. When I try to use

FormFile

2006-08-30 Thread Raghuveer
What is minimum requirement for file upload configuration in struts. My ActionForm is in "session" scope in actionmapping. What are precautions to configuring declaritively in struts-config.xml or in action in order to avoid unwanted thread/IO stream hanging or some other problems. After file

FormFile for uploading, via SSL

2006-06-28 Thread Steve Bement
We are using FormFile to do file uploads. Everything has been working fine with the app for months now. Yesterday we put the application behind SSL, and now file upload no longer works. In the action class, when we get the FormFile out of the form, it is null. Is there something we have to

Re: LazyValidatorForm FormFile instantiation exception

2006-03-21 Thread Niall Pemberton
The basic LazyDynaBean implementation tried to be smart about instantiating objects - so that people's regular POJO beans would get automtaically created. In hindsight IMO this was a mistake. It is however easy to remedy - by overriding the createOtherProperty() method - see the "4. Automatic Prope

LazyValidatorForm FormFile instantiation exception

2006-03-21 Thread David Durham
Hi, I've got a form-bean definition like so: ... When I load the page the first time, I get an instantiation exception: java.lang.InstantiationException: org.apache.struts.upload.FormFile It doesn't seriously affect the application, but I'm curious about the solut

Re: FormFile throws Serializable exception in session scope

2006-03-01 Thread Niall Pemberton
rch 01, 2006 5:11 PM > Ben gmail.com> writes: > > > > > I defined an ActionForm of which it has a FormFile. Prepopulation is > > not needed for this ActionForm. Configuring this ActionForm is similar > > to any other forms and here is the exception. I get this exception

Re: FormFile throws Serializable exception in session scope

2006-03-01 Thread Joe Germuska
Ben gmail.com> writes: > > I defined an ActionForm of which it has a FormFile. Prepopulation is > not needed for this ActionForm. Configuring this ActionForm is similar > to any other forms and here is the exception. I get this exception > when I startup/shutdown Tomcat. ..

Re: FormFile validation

2006-02-21 Thread Raja Sekhar Vujji/xinthe
"Struts Mailing List" cc Subject FormFile validation Hi all, I have a formfile and a bean with getters and setters. When validation fails, the other fields get the values already inserted, but the file input field gets empty and must be reselected. Is this normal, or is ther

FormFile validation

2006-02-21 Thread Markus Demetz
Hi all, I have a formfile and a bean with getters and setters. When validation fails, the other fields get the values already inserted, but the file input field gets empty and must be reselected. Is this normal, or is there a way to keep the file location in the input field? thanks, Markus

Re: FormFile file type validation

2006-01-16 Thread Laurie Harper
Daniel Kies wrote: Does anyone know of a validator that can be plugged into the validator framework that will check file types for FormFile? This would be so a user can't upload certain extensions like .exe and the application will catch it.. There's nothing in the standard set of

RE: FormFile file type validation

2006-01-16 Thread David G. Friedman
quot;); } else { System.out.prinlnt("Format=" + desc.getShortName() + ", MIME type=" + desc.getMimeType()); } === === Warning: If LGPL licenses bother you, don't use it. Regards, David -Original Message- From: Daniel Kies [mailto:[EMAIL PROTECTED] Sent: Monday, Janu

FormFile file type validation

2006-01-16 Thread Daniel Kies
Does anyone know of a validator that can be plugged into the validator framework that will check file types for FormFile? This would be so a user can't upload certain extensions like .exe and the application will catch it. thanks.

Re: NewB: Struts FormFile and Session scope FormBean

2005-12-24 Thread Rahul Akolkar
On 12/24/05, Kedar Panse <[EMAIL PROTECTED]> wrote: > Thanks, That would work. But still I'll have to have FormFile in to > ActionForm which is not seriliazable. Giving me error > > IOException while loading persisted sessions: java.io.WriteAbortedExcep

Re: NewB: Struts FormFile and Session scope FormBean

2005-12-23 Thread Kedar Panse
Thanks, That would work. But still I'll have to have FormFile in to ActionForm which is not seriliazable. Giving me error IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableExce

  1   2   >