Sorry for the newbie question so please go easy on me. I am a bit new to Java but have web development experience working with a MERN stack (MongoDB, Express, Angular, Node) to connect front end to back end.
Could anyone point me in the right direction to a tutorial I could reference to integrate Java into my web app as Google is of little help? Are you able to for example use Java methods inside of Javascript functions for event handlers?
Say I wanted to add a Java object to an arraylist when an onClick event triggers. Would I be able to call the Java method to add inside of the onClick event handler?
No, you are not able to call a Java method from JavaScript directly.
One of the solutions would be to have a Java web server that listens to requests. Then from JavaScript (web client), make requests to the Java server to obtain the responses.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With