Hi, all.
Can anybody help me? I want to upload file to the server, and then process
it there.
It may seems like simple problem. And I was think so. I create html form
like this:

<FORM name="uploadfile"
ACTION="${pageContext.request.contextPath}${actpage.handle}.html"
method="POST" ENCTYPE="multipart/form-data">
        <input type="file" name="ExportFile" value="">
        <input type="submit" value="Export" name="btUpload" />
</FORM>

and create servlet that process request. Here is bit of code

boolean isMultipart = ServletFileUpload.isMultipartContent(new
ServletRequestContext(request));
   if (isMultipart){
       // Create a factory for disk-based file items
        FileItemFactory factory = new DiskFileItemFactory();

        // Create a new file upload handler
        ServletFileUpload upload = new ServletFileUpload(factory);

        // Parse the request
        List /* FileItem */ items = upload.parseRequest(request);

items.isEmpty() is true !!! always
What I do wrong?
-- 
View this message in context: 
http://www.nabble.com/How-to-upload-file-to-the-server--tf4344476.html#a12376938
Sent from the Magnolia - User mailing list archive at Nabble.com.


----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------

Reply via email to