Error in getting form values
Fire Velocity <[email protected]>
| Newsgroups | gmane.comp.jakarta.commons.user,gmane.text.xml.commons.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi
I am using the commons-fileupload-1.2. I am trying to upload a file in a
portlet and some other attributes of file using html text box.
In the process action of a portlet i am only getting the file and not
other form values. Here is code .
<form action="$actionURL" method="POST"
enctype="multipart/form-data">
<table class="formAnswer" style="width: 100%;">
<tr>
<td colspan="2" width="100%"
class="emphasise"><b>Import</b></td>
</tr>
<tr>
<td width="20%" class="emphasise">Folder to Import</td>
<td width="80%"><input type="text" id="folderPath"
size="50" value="" readonly /></td>
</tr>
<tr>
<td width="20%" class="emphasise">Folder to Import</td>
<td width="80%"><input type="text" id="folderPath1"
size="50" value=""/></td>
</tr>
<tr>
<td width="20%" class="emphasise">File to Import</td>
<td width="80%"><input type="file" name="psmlFile"></td>
</tr>
<tr>
<td colspan="2" width="100%">
<input type="submit" value="Import"/>
</td>
</tr>
</table>
</form>
Portlet Code
DiskFileItemFactory diskFileItemFactory = new DiskFileItemFactory();
PortletFileUpload portletFileUpload = new
PortletFileUpload(diskFileItemFactory);
try {
if(PortletFileUpload.isMultipartContent(actionRequest)){
Iterator fileIt =
portletFileUpload.parseRequest(actionRequest).iterator();
In the itreator, i am only getting the single element
Please Help me .
--
Regards & thanks
*Vivek Kumar*
[email protected] <mailto:[email protected]>