You don't need to pass this from JavaScript, the values are in your form. Once you've submitted this form you will be able to read them off the request.
If you want to send your data to a servlet, you'll need a form. In your form, you will declare an action. The action should be the path to your servlet.