commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fire Velocity <fireveloc...@gmail.com>
Subject Error in getting form values
Date Thu, 14 Jun 2007 10:46:04 GMT
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*

firevelocity@gmail.com <mailto:firevelocity@gmail.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message