Iām currently working on a website and struggling with programming dynamic features.
The goal is for the user to input x in a textbox, click submit, process it using Java on the server side, and then display the outcome as a report to the user using JavaScript.
As of now, I am using JSP to handle users' input but I now need to transfer JSON data into the JavaScript. The JavaScript functions require JSON data to work properly.
My current setup includes JSP code that generates the required JSON data and JavaScript code that operates with hardcoded JSON data. I want to find a way to store the JSON returned by the JSP in a variable and pass it to the JavaScript. While I have a basic understanding of AJAX, I am uncertain if this integration is achievable or how to connect all the pieces together.
Any assistance would be greatly appreciated.