public static void redirectTo(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) throws JavaScriptException, FormattingException, WGAPIException, IOException {
TMLContext tmlContext = fetchInitialContext(cx);
if (args.length < 1) {
throw new EvaluatorException("Method WGA.redirectTo() needs a string parameter");
}
Object arg = args[0];
if (arg instanceof Wrapper) {
arg = ((Wrapper) arg).unwrap();