Apache Commons File Upload in Struts .. Please respond ASAP

P

pinik.smily4u

Hi,
I am using the following form/Struts 1.1 Action class for File Upload
and I am getting the fileitems as 0. Using Apache Commons File Upload
to parse the request in the Dispatch Action.


JSP:
<form name="merlinUpdatePkgForm" action="/admin/Pkg.do?
method=fileupload" method="post" enctype="multipart/form-data">
<input type="file" name="postalTablePath">
<input type=submit value="Submit">
</form>

Struts action Action class:
---------------------------
public class MerlinUpdPkgCommon extends DispatchAction
{

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws
Exception
{
DiskFileUpload fu = new DiskFileUpload();
List fileItems = = fu.parseRequest(request);
logger.info("fileItems"+fileItems.size());
Iterator itr = fileItems.iterator();
}

}

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top