Thank you for the response.
What you have answered is correct.
But the HTTP protocol (or a level above) allows several nested requests to perform one page.
This is what is done with a page containing an image. The browser sends a new request for each image. The request is regardless of if it is...
I can simplify the question by remove the servlet part of it.
What I need is some command or method that can do a request, and receive some text.
The text could be in a HTML file. And then I want to do something like this:
var request = new Request()
request.href = "example.html"...
Can I some way execute a servlet request, and receive a text string?
I have made a servlet that respond with contentType("text/plain") and a short text string.
I want to execute this servlet by some javascript command. Or it could be a HTML tag.
I do a similar thing with a servlet...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.