Getting null for input type file field on jQuery .click()
<p>I'm trying to upload a file using jQuery .click().I'm getting only file name when I do request.getParameter() in my controller. Further I cant read that file with only file name. 
But when I use action to my form I will get the object of the file. But I don't want to use action to my form.</p>

<p>My html is -</p>

<pre><code>$(document).ready(function(){

$('#submitId').click(function(){
    var url=$("#urlId").val();
    var xsl=$("#xslId").val();
    alert(xsl);
    $.post('add.htm', {
        url:url,
        xsl:xsl
    },function(data){
        alert("done");
    });
});
});

&lt;form:form commandName="domTool" enctype="multipart/form-data"
method="POST" &gt;

        URL :
        &lt;form:input  path="url"  id="urlId"/&gt;

        Xsl File :
        &lt;form:input type="file" id="xslId" path="file" /&gt;

        &lt;input type="button" value="Submit" id="submitId"/&gt;

&lt;/form:form&gt;
</code></pre>

<p>And my java code is -</p>

<pre><code>@RequestMapping("add")
public String add(@ModelAttribute("tool") DomTool domTool,HttpServletRequest   request,HttpServletResponse response) throws JDOMException, IOException{

    System.out.println("file---------- "+tool.getFile());
    System.out.println("Url---------- "+domTool.getUrl());
    return "success";
}
</code></pre>

<p>I'm getting value of url but I'm getting null for domTool.getUrl().</p>

<p>Please anyone help.</p>

<p>Thank you.</p>
