This will save in the upload directory (html/uploads) make sure to create this directory in your portlet. BTW. If you're creative with ../../.. you can store it outside of the portlet, or dynamically create folders ;-)

This will save in the upload directory (html/uploads) make sure to create this directory in your portlet. BTW. If you're creative with ../../.. you can store it outside of the portlet, or dynamically create folders ;-)

Thanks for this, but I was wondering if there is anyway you can send me the full source code of the portlet, as I am trying to use this, but i don't know how to make the view.jsp access the .java file automatically.

I have 2 components in view.jsp. It's file input tag(html file chooser) and textfield input tag. I want send data in 2 components to JAVA file, save file on web server and insert data received from textfileld into database. I any do 1 in 2 jobs above. Please help to do both.

I know its too late for your answer but for the ppl facing this type of problem just let me give the concept to deal with the problem . if you have normal HTML element + File Upload element in the form so when you submit the form it goes to Action and you get ActionRequest now to get the Normal HTML element you can use actionRequest .getparameter("officephone") or ParamUtil.getString(uploadPortRequst, "officephone") and after getting all the request parameters just convert ActionRequest to UploadPortletRequest like this

your code is working fine but i have 2 issues1- My uploaded files are not coming in realPath+"html/uploads/ folder. 2- Where can i view the file that i am uploading? In tomcat/data/dl there are many files with numeric name. how to find out my uploaded file?