I have only used fileupload. One of the problem i faced is when the enctype="multipart/form-data" ,all other input fields values except file can not be processed. Is there any workaround for that.
Mike Wang
Ranch Hand
Joined: May 09, 2003
Posts: 76
posted
0
Originally posted by sunitha raghu: I have only used fileupload. One of the problem i faced is when the enctype="multipart/form-data" ,all other input fields values except file can not be processed. Is there any workaround for that.
Multipart form reading : I've been using import com.oreilly.servlet.*; import com.oreilly.servlet.multipart.*; import com.oreilly.servlet.multipart.MultipartParser; You can download it. ( forgot the url). You're also supposed to buy the book - it will be in the liscense. It's a good book to have even if ya don't use the classes. Peace, jim
sunitha reghu
Ranch Hand
Joined: Dec 12, 2002
Posts: 937
posted
0
Jason Hunters package doesnt have that problem. But as i said using commons fileupload what is the solution.
Juanjo Bazan
Ranch Hand
Joined: Feb 04, 2002
Posts: 231
posted
0
Using Jakarta Commons FileUpload you can also process any other input field value in a multipart request. Just use the isFormField() method of the FileItem class. Try this:
HTH Juanjo
frisode jonge
Ranch Hand
Joined: Dec 30, 2003
Posts: 34
posted
0
ok, even if you are not using struts as mvc model, you can still use the struts taglibs. (and the jars obviously)
sunitha reghu
Ranch Hand
Joined: Dec 12, 2002
Posts: 937
posted
0
I tried that. ie why i asked the que. It wont work.
Originally posted by Juanjo Bazan: Using Jakarta Commons FileUpload you can also process any other input field value in a multipart request. Just use the isFormField() method of the FileItem class. Try this:
HTH Juanjo
Juanjo Bazan
Ranch Hand
Joined: Feb 04, 2002
Posts: 231
posted
0
Originally posted by sunitha raghu: I tried that. ie why i asked the que. It wont work.
I wont work? I have it working on production enviroment. Check your code or tell as what exception are you getting.
sunitha reghu
Ranch Hand
Joined: Dec 12, 2002
Posts: 937
posted
0
there is no exception. since the form type is "multipart" other input values will be null. make two text fields in spite of input type file and check whether u able to get the values of other fields.
Nicholas Cheung
Ranch Hand
Joined: Nov 07, 2003
Posts: 4982
posted
0
Just an outsider question. It seems that there are lots of open projects, each of them has its own FileUpload, or even other similar modules, like logging, etc. In fact, why they do so? They cannot just use the same module, or share their modules to each other? I feel it is too difficult to manage so much technologies that ususally share the same functions. Nick
Originally posted by Nicholas Cheung: Just an outsider question. It seems that there are lots of open projects, each of them has its own FileUpload, or even other similar modules, like logging, etc. In fact, why they do so? They cannot just use the same module, or share their modules to each other? I feel it is too difficult to manage so much technologies that ususally share the same functions. Nick
Thy maven , actually Jakarta libary is the offical lib of our comany. When we need a new function, we will consult whether Jakarta has already solved it.
Mike Wang
Ranch Hand
Joined: May 09, 2003
Posts: 76
posted
0
Originally posted by Lasse Koskela: I believe Mike meant that you should download the source code for Struts and take a look at how the Struts team has solved the problem.
Yes, you got me
VijayRawat Rawat
Greenhorn
Joined: Aug 19, 2004
Posts: 9
posted
0
Hi All, I am using the same facility of file upload. The problem is that when I am trying to upload file using my own servlet its working fine, but when I am trying to upload using Struts(struts tags), its giving problem. Its not able to come to Action class either. Can somebody throw light on this
Thanks in advance Vijay
somkiat puisungnoen
Ranch Hand
Joined: Jul 04, 2003
Posts: 1312
posted
0
you should see example about Struts Upload.
And please post your code that it's have error for more information to solve this problem. [ October 31, 2004: Message edited by: somkiat puisungnoen ]
SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand