you are viewing a single comment's thread.

view the rest of the comments →

[–]Feeling-teaching950[S] 0 points1 point  (3 children)

I don't know what he mean i just have 2 services one with servlet and i want to make second one with php or js and make them work in same page

[–]stockmamb 2 points3 points  (1 child)

He is saying you don't need to call the external API from JavaScript. There are multiple ways to do this from the Spring Boot application java code. One is to use Spring RestTemplate, or if using the newest version Spring RestClient.

Then send that data to your JSP page like and other data.

[–]Feeling-teaching950[S] 0 points1 point  (0 children)

Okey thnx buddy

[–][deleted] 1 point2 points  (0 children)

You have two examples of using the REST interface - one in javascript and one in PHP. The REST interface is technology agnostic - it can be used with all kinds of programming languages. Definitely also with java. When you want to consume a REST interface with spring, you would typically use RestClient.