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
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
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
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
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
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
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
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
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
Hi Ravindra,
I have done it but really dont no why it dint got pasted properly on forum
image/png,image/gif
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
Hi Ravindra,
I have done it but really dont no why it dint got pasted properly on forum
image/png,image/gif,image/jpeg
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
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
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
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
--- 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
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
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
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
--- 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
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?
>
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
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
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
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
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) {
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
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
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
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
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
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
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
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
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
36 matches
Mail list logo