• 0

[Java/Servlet] RequestDispatcher


Question

Hi all.

I've got a servlet that uses RequestDispatcher a lot, I use the .include() method to produce my output.

I've got a few of these as my servlet talks to a server, so I keep doing a .include() to output data after I've done some stuff. This all works fine as once everything is done, I get to see my jsp page.

However, I wish to output the data as I get it. ?Instead of dumping it in one go once I've recieved everything from the server.

Anyway to do this?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Basiclly I have a client and a server.

The client has 3 requests, which it does in order (e.g. send request 1, do something, send request 2, dor something....)

What that "do something" is can be anything from receiving a response or a timeout.

And it's at that "do something" stage I need to tell the user what is going on.

So the client starts up and sends the first request

I get a response from the server, output the response

Send request 2

NO response from the server, output saying timeout.

So far it does that, but it does not display anything untill the servlet has finished communications.

It builds up the page fine and says what has happend, but I want this done LIVE, not in one big go.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.