Issue 501 in struts2-jquery: Submit Form with enctype="multipart/form-data" doesn't works :-(

160 views
Skip to first unread message

struts2...@googlecode.com

unread,
Apr 13, 2011, 10:49:03 AM4/13/11
to struts2...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 501 by Din...@gmail.com: Submit Form with
enctype="multipart/form-data" doesn't works :-(
http://code.google.com/p/struts2-jquery/issues/detail?id=501

(This is for feature requests and bugs in Struts2 jQuery Plugin - for
getting help, please use the User Group.
http://groups.google.com/group/struts2-jquery )

What steps will reproduce the problem?
1.Create a struts2 form with enctype="multipart/form-data" like :

<s:form action="doUpload_upload" enctype="multipart/form-data">
<s:select
label="%{getText('list.model.trace')}"
name="traceModelSelected"
list="traceModels"
listKey="localName"
listValue="localName" />

<s:file name="upload" size="100" key="file"
accept="text/csv,text/comma-separated-values"/>
<sj:submit id="sumitFileId"
targets="main"
indicator="indicator"
button="true"
value="%{getText('submit.file')}"
buttonIcon="ui-icon-refresh">
</sj:submit>
</s:form>

2.Click on submit button
3.Saw in Firebug console :struts2_jquery] submit form : doUpload_upload but
nothing append :(

What is the expected output? What do you see instead?
I expect that my file is uploaded but nothing append.


Which struts2 version?
struts 2.2.1.1

Which struts2-jquery plugin version?
struts2-jquery plugin 2.5.3


If i remove in element <form/> the attribute enctype="multipart/form-data"
and the element <file /> the post of form works but when one of these
elements is present nothing append :-(

struts2...@googlecode.com

unread,
Apr 14, 2011, 7:17:30 AM4/14/11
to struts2...@googlegroups.com

Comment #1 on issue 501 by Din...@gmail.com: Submit Form with
enctype="multipart/form-data" doesn't works :-(
http://code.google.com/p/struts2-jquery/issues/detail?id=501

Hi

Please johgep Could you confirm this bug please ? Or tell me how can I do
this ?
Thanks :)

Dino COSMAS

unread,
Apr 19, 2011, 4:38:51 AM4/19/11
to struts2...@googlegroups.com
In fact it isn't a bug, I had some mistake in my code sorry for this issu, you can delete it.

Thanks !



--
You received this message because you are subscribed to the Google Groups "struts2-jquery" group.
To post to this group, send email to struts2...@googlegroups.com.
To unsubscribe from this group, send email to struts2-jquer...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/struts2-jquery?hl=en.




--
Dino COSMAS

struts2...@googlecode.com

unread,
Apr 26, 2011, 3:35:35 AM4/26/11
to struts2...@googlegroups.com
Updates:
Status: Accepted
Owner: johgep
Labels: Component-Plugin

Comment #2 on issue 501 by johgep: Submit Form with

enctype="multipart/form-data" doesn't works :-(
http://code.google.com/p/struts2-jquery/issues/detail?id=501

I will check this.

struts2...@googlecode.com

unread,
May 5, 2011, 10:43:09 AM5/5/11
to struts2...@googlegroups.com

Comment #3 on issue 501 by johgep: Submit Form with
enctype="multipart/form-data" doesn't works :-(
http://code.google.com/p/struts2-jquery/issues/detail?id=501

Can you please try out the current SNAPSHOT from Maven Repository.

http://oss.sonatype.org/content/repositories/snapshots/com/jgeppert/struts2/jquery/

There is a new form plugin included. I think this solves your problem.

Dino COSMAS

unread,
May 6, 2011, 1:55:04 AM5/6/11
to struts2...@googlegroups.com
It's works thanks !

--
You received this message because you are subscribed to the Google Groups "struts2-jquery" group.
To post to this group, send email to struts2...@googlegroups.com.
To unsubscribe from this group, send email to struts2-jquer...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/struts2-jquery?hl=en.




--
Dino COSMAS

struts2...@googlecode.com

unread,
May 6, 2011, 2:09:02 AM5/6/11
to struts2...@googlegroups.com
Updates:
Status: Started
Labels: Milestone-3.0.0

Comment #4 on issue 501 by johgep: Submit Form with

enctype="multipart/form-data" doesn't works :-(
http://code.google.com/p/struts2-jquery/issues/detail?id=501

(No comment was entered for this change.)

struts2...@googlecode.com

unread,
May 6, 2011, 8:37:01 AM5/6/11
to struts2...@googlegroups.com
Updates:
Status: Fixed

Comment #5 on issue 501 by johgep: Submit Form with

struts2...@googlecode.com

unread,
Jun 8, 2011, 2:29:23 AM6/8/11
to struts2...@googlegroups.com

Comment #6 on issue 501 by Din...@gmail.com: Submit Form with
enctype="multipart/form-data" doesn't works :-(
http://code.google.com/p/struts2-jquery/issues/detail?id=501


Hi Johannes,

This issue come back and I don't understand how solve it :-(
The (source) jar of a simple web application is attached and enable you to
see the bug :
just run the webapp (I used Tomcat 7)
clique on the link "ajax form"
clique on the button "Ajax submit"
And see : the "#formResult" div stay with the waiting message whereas
the "<p>echo ... </p>"
But if you use firebug extension you'll see that the response is correct
and contains "<p>echo : </p>".
No js error is occured, and if you remove the enctype on the form and the
field file : it's works...

I become mad !!!!

Could you please try this ?

Thanks !!!


Which struts2 version?
struts 2.2.1.1

Which struts2-jquery plugin version?
struts2-jquery plugin 3.0.2


struts2...@googlecode.com

unread,
Jun 8, 2011, 2:33:24 AM6/8/11
to struts2...@googlegroups.com

Comment #7 on issue 501 by Din...@gmail.com: Submit Form with
enctype="multipart/form-data" doesn't works :-(
http://code.google.com/p/struts2-jquery/issues/detail?id=501

and the file ...just add lib folder in WebContent\WEB-INF\
it's the same lib folder as that in showcase.war

Attachments:
mTraceTest.jar 12.0 KB

struts2...@googlecode.com

unread,
Jun 9, 2011, 12:02:51 PM6/9/11
to struts2...@googlegroups.com
Updates:
Status: Started
Labels: -Milestone-3.0.0 Milestone-3.1.0

Comment #8 on issue 501 by johgep: Submit Form with

enctype="multipart/form-data" doesn't works :-(
http://code.google.com/p/struts2-jquery/issues/detail?id=501

Thank you for the test case. This is fixed with new form plugin version in
the trunk.

http://code.google.com/p/struts2-jquery/source/detail?r=1457

struts2...@googlecode.com

unread,
Jun 14, 2011, 8:16:39 PM6/14/11
to struts2...@googlegroups.com

Comment #9 on issue 501 by asw...@5amsolutions.com: Submit Form with
enctype="multipart/form-data" doesn't works :-(
http://code.google.com/p/struts2-jquery/issues/detail?id=501

Johannes,

Since you were saying that my issue was related to this issue, I thought I
should provide you a sample web app showing the issue I'm talking about,
since I can't attach files in the other discussion I will comment here.

The application is a basic web app which creates a dialog with a form
containing a single file upload. Below that are 2 <sj:a/> links, one that
indicates the formId and a URL to submit to, and a second that does not
contain the additional URL. The first one fails and the second one does not
(look at the post parameters in Firebug).

Attachments:
StrutsJQueryFileUploadTest.zip 20.2 KB

struts2...@googlecode.com

unread,
Jun 20, 2011, 9:33:14 AM6/20/11
to struts2...@googlegroups.com

Comment #10 on issue 501 by johgep: Submit Form with
enctype="multipart/form-data" doesn't works :-(
http://code.google.com/p/struts2-jquery/issues/detail?id=501

Issue 559 has been merged into this issue.

struts2...@googlecode.com

unread,
Jun 22, 2011, 12:49:40 PM6/22/11
to struts2...@googlegroups.com

Comment #11 on issue 501 by cranc...@gmail.com: Submit Form with
enctype="multipart/form-data" doesn't works :-(
http://code.google.com/p/struts2-jquery/issues/detail?id=501

Johannas,

When using 2.5.x release, I had a form submitted via a sj:submit that sent
a file to the server for storage. The action upon success would close the
dialog and refresh the div where a list of the file uploads were shown. In
the event of an error or a request to go back to the 'input', the struts
XML was configured to return a type of 'httpheader' with values '501'
and '502' accordingly. This worked great because these triggered the
onErrorTopic handler.

Well noticed that the snapshot from Jun 07 was no longer working, so
updated to the snapshot from Jun 21. While the upload works perfectly, the
HTTP response of 501 is not detected as an error and only the
complete/success topics are being published.

Can the onErrorTopic be published when 5xx responses are detected?


struts2...@googlecode.com

unread,
Jun 29, 2011, 3:21:04 PM6/29/11
to struts2...@googlegroups.com
Updates:
Status: Fixed

Comment #12 on issue 501 by johgep: Submit Form with

enctype="multipart/form-data" doesn't works :-(
http://code.google.com/p/struts2-jquery/issues/detail?id=501

We should create a separate Issue for the onErrorTopic problem.

Reply all
Reply to author
Forward
0 new messages