ajax post is not sending param : Req :in web application using struts/velocity

javascript need to pass parameter to a method in java class. I have used ajax post call to servlet. But not able to receive the parameter in action class.

javascript function
----------------------

    funtion posttoservlet(){
    var id=2
    var param="Count="+id;
    var xmlhttp= new XMLHttpRequest();
    xmlhttp.open("POST","DataServlet.action",true);
    xmhttp.setrequestheader('contenttype','plain/text');
    xmlhttp.send(param);
    }

struts.xml
__________________________

    <action name="DataServlet" method="getfromjs" class=com.test.servletpost>
    </action>


servletpost.java
----------------------


 

       public void getfromjs(){
        
        syso(servletactioncontext.getrequest().getparameter("Count")); // This is printing null instead of printing "2". Please advise.
        }


Iam confused why the parameter are not posted properly 


