W
W
wolf-98302015-09-24 20:48:52
Java
wolf-9830, 2015-09-24 20:48:52

How to output a servlet to java differently?

I study servlets in java, usually when you click on the submit button, it goes from the main page to another page, where the output of the result of the servlet's work is shown, the question is:
How to make the servlet output be on the main page, for example, under the same submit button?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Cheremisin, 2015-09-24
@leahch

There are several options:
- do not send to another page, but return the same one, specify the same page in the form
- use javascript and onclick on the button, send the form result via javascript
- the same as above, but use json as the format communication with the servlet.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question