Hello every one, I'm having a difficulty implementing "multipart/form-data" in my form. When I use <FORM name="mail" action="http://live:8080/jsps/send.jsp" enctype="multipart/form-data" method="POST"> the request in send.jsp CAN NOT see any data of the form, and when I pull enctype="multipart/form-data" out of the form, request can access every piece of information in the form. I have to have enctype="multipart/form-data" in my form for later usage by an Apache library. Can anyone please tell me what's happening here and IF can I have both - enctype="multipart/form-data" in the form AND have the request accessing the data in the form? Thanks in advance.
So, commons.fileupload libraries by Apache (are these the ones you're talking about?) do use a request for instanciation. And, catch 22, they require multipart to be true when request gets passed as a parameter in order to instanciate the libraries. So I just don't know what I need to have happening in the form and the code to successfuly use these Apache libraries. If anyone used commons.fileupload, please respond. Thanks in advance.
posted 13 years ago
Originally posted by liliya woland: So I just don't know what I need to have happening in the form and the code to successfuly use these Apache libraries. If anyone used commons.fileupload, please respond. Thanks in advance.
You can write and configure a seperate resource, such as filter, to handle multipart requests. you need is to define your form as multipart/form-data. For more please refer to Using Commons Fileupload.
We're being followed by intergalactic spies! Quick! Take this tiny ad!