You can inform me about how to pass variable values between java and javaScript, as well as how I can call java methods from javascript Thank you very much for your help.
You can inform me about how to pass variable values between java and javaScript, as well as how I can call java methods from javascript Thank you very much for your help.
As you are beginning, perhaps the simplest and most primitive way is through JSP (java server page). Allows you to directly send data from java to javaScript. The jsp pages are compiled into an html that is sent to the client.
Here is a simple example:
<%
String str="Hello world";
%>
<script>
var jsvar = <%=str%>;
</script>
Once you know the JSPs, you could use libraries above JSP as JSTL: link
Of course, you should not stop looking at Servlets and ajax calls either. Here you have information about a simple implementation of stackOverflow with different javaScript libraries against Java Serlvets: link