...

View Full Version : JSONRpcClient and Java class



otnj2ee
09-04-2008, 02:25 AM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum