title: Call Servlet and invoke Java code from JavaScript along with parameters
body: <p>I have session key that is a JavaScript variable which I got from a REST API call. I need to call my Java code in a servlet and pass that key as a parameter. What JavaScript function can I use to do that?</p>