public class Executor {
public String execute(String sid, HttpServletRequest request) {
String result = null;
Server serv = new Server();
String rid = null;
String server = null;
include.auth.Validation val = new include.auth.Validation();
RequestParameter params[] = httpServlet2Parameters(request);
// System.out.println("[Executor] Executing function 'execute'. Parameters:");
// System.out.println("[Executor] sid: '" + sid + "'");
rid = getParameter("rid", params);
/* rid is in JS format (w/ "_") */
if (rid.indexOf('_') != -1)
rid = rid.replace('_', '@');
server = rid.substring(rid.indexOf('@') + 1);
if (serv.isMyName(server)) {
// System.out.println("[Executor] Local execution.");
if (val.validate(sid) != null) {
// System.out.println("[Executor] Session is valid.");