I have to create 2 projects. Web Service and one is Web project. I created the web service using Rest in spring boot and web project using dynamic web project using Jsp and servlets. Now I have to consume the web service in web project. How can I do ?
Asked
Active
Viewed 740 times
-1
-
Hi, You can do AJAX call from your JSP side to your REST server side using Javascript. You can also use library like JQuery or axios (there MDN versions since you are using JSP) to send REST API calls to your same or any other server. You can follow https://stackoverflow.com/a/44859872/8684299 this answer. – Akash Jain Feb 27 '21 at 02:20
-
Thank you . I am new to all this. It definitely gave an idea how to proceed. – Anisa Gilani Feb 27 '21 at 20:21
-
please check below answer so that people know your question is closed – Akash Jain Feb 28 '21 at 03:02
1 Answers
0
You can do AJAX call from your JSP side to your REST server side using Javascript. You can also use library like JQuery or axios (there MDN versions since you are using JSP) to send REST API calls to your same or any other server. You can follow https://stackoverflow.com/a/44859872/8684299 this answer.

Akash Jain
- 316
- 2
- 10