How do we call a method in a jar file from a java script method. I am using a third party to authenticate a HTML5 application, the jquery method redirects to the third party url and they redirect back to the app after validation at their end. Now in Java we can use the methods in their jar file to get back the User ID, but I am not sure if we can do it using js.
Code in java, the jar is added in the classpath -
private static String UID(HttpServletRequest req) {
String unEncCookie = null;
String cookie = getSecCookie(req);
if (cookie == null)
return null;
else {
unEncCookie = JAR.JAR(cookie, "param1", "param2");
if (unEncCookie == null || "".equals(unEncCookie))
return null;
else{
return unEncCookie.split("\\|")[5]; // 6th value is UID
}
}
}