So you want to send some data to the servlet and want to display a PDF (which is generated by the servlet based on the data sent) in the browser?
There are two ways of how to do it:
1.) Using RequestBuilder you could generate a AJAX call to your Servlet (as you did it). However in the callback method of the RequestBuilder you will get the response from the servlet (probably the PDF binary data) and then you could use that to open a new window with the binary PDF data.
however I think the easier approach is the following:
2.) Have either a form or a URL which points to the URL of the servlet responsible for generating the PDF. The data you want to pass to the servlet can bei either passed by POST (form) or GET (url) and in the servlet make sure that response headers are set properly (application/PDF).
second appraoch is easier.