P
P
P_Alexander2018-02-01 13:37:52
Java
P_Alexander, 2018-02-01 13:37:52

How to send a post to the server on click of a button in jsp without reloading the page?

Hello, I am interested in the question of how to send a request to the server by clicking on a button in jsp, without reloading the page, namely, there is a jsp with products and I want to add the product to the cart by clicking on the button next to the product! tell me how this is done, I will be grateful if you tell me how it is done correctly, I will also be happy with examples! Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2018-02-01
@P_Alexander

jsp on the client turns into html and to make a request to the backend without reloading the page, you need to use ajax. Look here Vanilla js or jQuery

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question