Any jQuery function only to send data to servlet?

Any jQuery function only to send data to servlet?

Hi.  I'm looking for a jquery function that only sends data to Java servlet.

jquery.get('url' , {name: "soichi"})

does send the data (in this case, the name) to the servlet.  But I want the servlet to create a new HTML page based upon the sent data and to redirect to it.
So, maybe I should write in Java,

public void doGet(HttpServletRequest req, HttpServletResponse resp)

throws IOException {

String text = null;

text = req.getParameter("name");

resp.setContentType("text/html");

resp.getWriter().print("<html><body><h1>" + text + "</h1></body></html>");

resp.sendRedirect("redirected.html")

}


something like this. I am not sure, though.


Could anyone provide some ideas for me?

If it works better, it does not have to be jQuery.  Pure JavaScript or Java is OK as long as it achieves what I want.


Thanks in advance.


soichi