commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vivek Kumar <fireveloc...@gmail.com>
Subject Error in getting form values
Date Thu, 14 Jun 2007 13:57:17 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">Import</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

-- 
View this message in context: http://www.nabble.com/Error-in-getting-form-values-tf3921915.html#a11120661
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message