invoke doPost in java servlet through ajax

invoke doPost in java servlet through ajax

Hey.=)
I'm trying to invoke my doPost method in java servlet through ajax command.
Don't seem to get it right.

I got this code in the doPost method in my servlet:
  1. String title = request.getParameter("title");
  2. String price = request.getParameter("price");
  3. String quantity = request.getParameter("quantity");
  4. // and alot more code
Got this code in my HTML:
  1. <span>Title:</span> <input type="text" name="title" /><br />
  2. <span>Price</span><input type="number" step="0.01" name="price" /><br /> 
  3. <span>quantity</span><input type="number" name="quantity" /><br /> 
  4. <input type="button" value="add Item" id="addItemToShoppingCart" />
and this code in my js file:
  1. $(function() {
  2.       $("#addItemToShoppingCart").click( function() {
  3.             $.post("ShoppingCart")
  4. })
  5. })
Of course it don't work.
I want to make the call to doPost and send the params without form and submit.