Following this thread, I tried to upload a file on the server. If I use a simple form like this:
<form action="/site/subscribers_import" method="post" enctype="multipart/form-data">
    <input type="file" name="file" />
    <input type="submit" />
</form>
everything goes well, but if I try to modify the form, like this:
<form action="/site/subscribers_import" method="post" enctype="multipart/form-data" >
    <input type="submit" value='${importLabel}' style="float: right;" />
    <div id="chooseFileBttn" style="width:3em; height: 2em; cursor:pointer; float: right;" onclick="getFile()">
    <img src="/site/images/import.png" title="${importUsers}" height="20" width="30" style="padding-right: 10px; float: right;"/>
    </div>
    <div style='height: 0px;width:0px; overflow:hidden;'>
        <input id="upfile" type="file"/>
    </div>
</form>
<script>
        function getFile(){
            document.getElementById("upfile").click();
        }
</script> 
I don't get anything in the servlet. Does anyone have any idea why that? Thanks!
 
     
    