Re: Fileupload misbehaving

2012-07-20 Thread Antonios Gkogkakis
Hi Ahmed, you have to have a setter for your these fields, private File secImage; private String secImageContentType; private String secImageFileName; On 20 July 2012 19:40, Ahmed Khan wrote: > Hi, > > I have a struts 2 application where 2 pages have struts file upload. One > works perfectly

RE: FileUpload - Directory selection

2009-10-27 Thread RogerV
vishnu.vyasan wrote: > > Hi Roger, > > I don't know whether its correct approach or not, but make the user zip > the directory and upload it. > > Best Regards > Vishnu NV > > Hm .. that's an idea, but I'd still need to be able to select an output directory ... I'm working in an Intranet

RE: FileUpload - Directory selection

2009-10-27 Thread Vishnu Vyasan Nelliparmbil
Hi Roger, I don't know whether its correct approach or not, but make the user zip the directory and upload it. Best Regards Vishnu NV -Original Message- From: RogerV [mailto:roger.var...@googlemail.com] Sent: Tuesday, October 27, 2009 10:59 AM To: user@struts.apache.org Subject: Fil

Re: Fileupload

2009-07-21 Thread Wes Wannemacher
On Tuesday 21 July 2009 03:40:55 am taltun wrote: > Hi, > > When uploading an image using file upload calling this code: > > InputStream stream = new BufferedInputStream(new FileInputStream(file)); > > It seems like the webapplication try to access the filesystem temporary to > create the file usin

Re: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread Dave Newton
sajidbigler wrote: i have done and followed all steps and following are the jars in my application(MMSApplication\WebRoot\WEB-INF\lib) commons-beanutils-1.7.0.jar commons-fileupload-1.2.1.jar commons-io-1.4.jar commons-logging-1.0.4.jar commons-logging-api-1.1.jar commons-validator-1.3.1.jar dwr

Re: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread Dave Newton
sajidbigler wrote: why forum skips files \MMSApplication\WebRoot\WEB-INF\lib in bracket and param name="allowedTypes" in struts.xml while i post it ? :( application/vnd.ms-excel Probably because it tries to interpret tags as actual tags; that's why using the mailing list directly and posting

RE: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread sajidbigler
why forum skips files \MMSApplication\WebRoot\WEB-INF\lib in bracket and param name="allowedTypes" in struts.xml while i post it ? :( application/vnd.ms-excel -- View this message in context: http://www.nabble.com/Fileupload-%3A-Restricted-contentType-is-working-fine-but-no-proper-error-messag

RE: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread sajidbigler
I think if jars are not included properly it would not even allow me to submit correct files() but i can do every thing and more over its telling the file is not a correct contentType but no message is shown to user in browser :( i even kept struts.properties struts.custom.i18n.resources=MMSApp

RE: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread sajidbigler
Error on Console Mar 16, 2009 4:50:49 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger error SEVERE: Content-Type not allowed: upload "simplifiedapi.pdf" "upload__1ed47216_1200f02e810__8000_0001.tmp" application/pdf Error on Browser HTTP Status 500 - type Exception report mes

RE: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread ravindra
: RE: Fileupload : Restricted contentType is working fine but no proper error message is shown to user Hi Ravindra, I have done it but really dont no why it dint got pasted properly on forum image/png,image/gif

RE: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread sajidbigler
I have included this but still errors wont be send to end user and more over surprizingly why the forum trims these lines when i copy/paste from my struts.xml :( image/png,image/gif,image/jpeg -- View this message in context: http://www.nabble.com/Fileupload-%3A-Restricted-contentType-is-workin

RE: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread sajidbigler
Hi Ravindra, I have done it but really dont no why it dint got pasted properly on forum image/png,image/gif,image/jpeg

RE: Fileupload : Restricted contentType is working fine but no proper error message is shown to user

2009-03-16 Thread ravindra
You have to mention param -allowed types. image/png,image/gif,image/jpeg,text/plain -Original Message- From: sajidbigler [mailto:sajidbig...@gmail.com] Sent: Monday, March 16, 2009 4:23 PM To: user@struts.apache.org Subject: Fileupload : Restricted cont

Re: fileUpload vs custom servlet

2008-07-11 Thread Laurie Harper
webdev2 wrote: I upgraded my app to Struts2, which provides file uploading. Now my custom servlet for uploading an attachment no longer receives the request. Is there a configurable option for restoring the old functionality of having the custom servlet upload the attachment? Thanks. What

Re: fileUpload vs custom servlet

2008-07-11 Thread Joachim Rohde
If you don't need the file-upload interceptor then remove it from your interceptor stack or exclude it for those actions which rely on your custom fileupload-servlet. webdev2 schrieb: I upgraded my app to Struts2, which provides file uploading. Now my custom servlet for uploading an attachme

Re: FileUpload exception

2008-04-18 Thread Pablo Vázquez Blázquez
Hi, Any idea? Pablo Vázquez Blázquez escribió: Hi! How and where can I catch a org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException to inform the user? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTE

Re: FileUpload problem for files larger than allowed

2008-01-03 Thread Dave Newton
--- saint_john <[EMAIL PROTECTED]> wrote: > yes, i have to do something like prepare(). > But struts behavior is very doubtful in case of validation error - it's I > DECIDE where execution control should flow (i mean INPUT result, SUCCESS or > ERROR or whatever i want), not struts. Then don't use

Re: FileUpload problem for files larger than allowed

2008-01-03 Thread saint_john
yes, i have to do something like prepare(). But struts behavior is very doubtful in case of validation error - it's I DECIDE where execution control should flow (i mean INPUT result, SUCCESS or ERROR or whatever i want), not struts. newton.dave wrote: > > Oh; I'm not sure why you'd do that in

Re: FileUpload problem for files larger than allowed

2008-01-03 Thread Dave Newton
Oh; I'm not sure why you'd do that in addActionError(), though. That's what prepare() etc. are for, isn't it? d. --- saint_john <[EMAIL PROTECTED]> wrote: > > Thanks for help. > > "View data" - some info from DB displayed in jsp after action execution > > > newton.dave wrote: > > > > --- sa

Re: FileUpload problem for files larger than allowed

2008-01-03 Thread saint_john
Thanks for help. "View data" - some info from DB displayed in jsp after action execution newton.dave wrote: > > --- saint_john <[EMAIL PROTECTED]> wrote: >> Yes, my action's addActionError() was called, but not the execute() >> method. >> It is very sad what I should fill view data inside addA

Re: FileUpload problem for files larger than allowed

2008-01-03 Thread Dave Newton
--- saint_john <[EMAIL PROTECTED]> wrote: > Yes, my action's addActionError() was called, but not the execute() method. > It is very sad what I should fill view data inside addActionError() instead > of execute(). execute() isn't called if there's a validation error. I don't know what you're refe

Re: FileUpload problem for files larger than allowed

2008-01-03 Thread saint_john
Yes, my action's addActionError() was called, but not the execute() method. It is very sad what I should fill view data inside addActionError() instead of execute(). newton.dave wrote: > > http://struts.apache.org/2.x/docs/file-upload-interceptor.html > > It's a validation error, isn't it? >

Re: FileUpload problem for files larger than allowed

2008-01-03 Thread Dave Newton
http://struts.apache.org/2.x/docs/file-upload-interceptor.html It's a validation error, isn't it? d. --- saint_john <[EMAIL PROTECTED]> wrote: > > Hi all, > > I've got the following problem: > > I have a form to upload files and everything works fine until i upload a > file larger than upper

Re: FileUpload problem for empty files.

2008-01-03 Thread Michał Letyński
I found that there is a Treshold parameter, here is short info: / "Sets the size threshold beyond which files are written directly to disk." /This paramater is set to 0. So my attachment is not written to disk but is keeped in memory. In struts 1 this parameters was set to 262144. But my problem

Re: Fileupload in JBOSS AS

2007-03-05 Thread torben
I have found the problem. I forgot to install commons-fileupload and commons-io. Torben torben wrote: I have problem to upload a file using strut2 in an jboss server, version 4.0.5 In the jsp page I have: enctype="multipart/form-data"> accept="application/vnd.ms-powerp

Re: [Fwd: Re: [fileUpload] Question about file name]

2005-06-10 Thread Frank W. Zammetti
What does the term "normalize" mean in this context? I thought the issue being discussed was parsing an uploaded filename to get just the filename sans path, as IE sends... where uploads from Windows to a Unix server means that if you use the File.pathSeparatorChar to parse the name, you would rea

Re: [Fwd: Re: [fileUpload] Question about file name]

2005-06-09 Thread Dakota Jack
Frank, If the File class does not normalize the string used to create the File, then there is a bug. There seems to be a bug in one version of Linux and that has been reported to Sun. The constructor for File is as follows: public File(String pathname) { if (pathname == null) {

[Fwd: Re: [fileUpload] Question about file name]

2005-06-09 Thread Frank W. Zammetti
Sorry guys, meant for this to go to the list only... On Thu, June 9, 2005 4:35 pm, Martin Cooper said: > Nope. If the upload came from a Windows system and the server is running on *nix, then the system separator is *not* what you want. You'd be looking for '/' in a path that uses '\' as the se

Re: FileUpload Errors

2004-10-21 Thread Michael McGrady
I'll be darned! If you go back to Struts 1_1 you find that "CommonsMultipartRequsetHandler does have the long cast to an int. So, that is probably the source of the error. Michael McGrady Michael McGrady wrote: The method setMaxFile(long) exists even in older versions. So, are you doing some

Re: FileUpload Errors

2004-10-21 Thread Marwan Salam
Hi Michael, Thank you for your follow up. I notice there is a classpath confusion somewhere but since Struts and commons-fileupload are so intermingled, I can't separate them from each other. I have tried Struts 1.2.4 but still got the same exception. The reason I am still working with 1.1 is

Re: FileUpload Errors

2004-10-21 Thread Michael McGrady
To tell you the truth, Marwan, although there are different strokes for different folks, I find the Struts implementation of commons upload in CommonsMultipartRequestHandler not to my "taste". There seem to be continual problems with it as well. Maybe that is my bias. Don't know. Anyway, Co

Re: FileUpload Errors

2004-10-21 Thread Michael McGrady
Hi, Marwan, I am going to look into this a bit, but I have to tell you that using the Struts application looks harder to me than rolling your own and working with commons upload directly. Anyway, the code you attribute to CommonsMultipartRequestHandler, viz., DiskFileUpload upload = new DiskFi

Re: FileUpload Errors

2004-10-21 Thread Marwan Salam
My action is pasted below. As you will see I never call setMaxFile (long) in my acdtion. From the stack trace it looks like Struts internal classes are doing the call: org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest (CommonsMultipartRequestHandler.java:219) These are the 2

Re: FileUpload Errors

2004-10-21 Thread Michael McGrady
The method setMaxFile(long) exists even in older versions. So, are you doing something other than tossing a long value into that method? Michael McGrady Travis Reeder wrote: Looks like you need the latest commons-fileupload.jar. Travis -Original Message- From: Marwan Salam [mailto:[EMA

RE: FileUpload Errors

2004-10-21 Thread Travis Reeder
Looks like you need the latest commons-fileupload.jar. Travis -Original Message- From: Marwan Salam [mailto:[EMAIL PROTECTED] Sent: Thursday, October 21, 2004 10:21 AM To: [EMAIL PROTECTED] Subject: FileUpload Errors Hi all, I am using Struts 1.1 and I am trying to upload an image fi

RE: FileUpload: Stream ended unexpectedly

2004-05-04 Thread JoAnn Lemm
l --JoAnn -Original Message- From: bouchalhi yann [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 04, 2004 1:47 AM To: [EMAIL PROTECTED] Subject: Re: FileUpload: Stream ended unexpectedly Hello JoAnn , in what file you have changed the Tomcat's socket connection timeo