I wonder how the HttpServletRequest gets passed:

In javascript:

try {
jsonrpc = new JSONRpcClient("/test/json.htm?cmd=handleJsonRpc");

jsonrpc.testRPCService.getResult(...);

//The HttpServletRequest is not set yet

}


json.htm--> Java JASON.java:

public void handleJsonRpc(HttpServletRequest request, HttpServletResponse response) throws Exception {
JSONRPCServlet jsonRpcServlet = new JSONRPCServlet();
jsonRpcServlet.service(request, response);

//The HttpServletRequest is now set, but to where?
}


jsonrpc.testRPCService--> In Java Class TestRPCService.java

public Map getResult(HttpServletRequest request){

//How does the request get passed to here?

}


The JSONRpcClient is initiated from the javascript, but the HttpServletRequest object is generated on the java side and passed to another function in different class, how does it get done?


Thanks


Scott