java – How to push/send data from server (REST api response) to a jsp/html form


My requirement is as below

A user before scanning a label will open the web application(spring-boot) and click on a link which shows an empty html form. Now when he scans the label, the details of that scan should auto populate in the form that he had opened. Behind the scenes, the same application will also expose a REST api which receives the the details of the scan in JSON format. This json values should be pushed automatically to the form that is already open.

Are websockets a way to fulfill the above requirement? Or is there a better/easier way to do this?


How to&Answers:

Leave a Reply

Your email address will not be published. Required fields are marked *