Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can a servlet response multiple times to single request

 
Em Aiy
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as the title explains, is there any way that i can response multiple times to single request.

Scenario,

On request from my page, the request goes to servlet, servlet response to some particular information and then start proceeding to implement the other logic after the end of the logic, it has to response again to that requested page. But How?

Uptill now i am unable to implement this thing and using an alternate way to do that which is actuall not a way ...
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, there is only one response per request.
This is how HTTP works.

What are you trying to do?
 
Em Aiy
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ahan, actually i want to display "please wait message" on report download request. I also want that if there is some problem then there should be some message writen in that POP-UP that there is some problem, please try again.

how can i ?
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What Ben said about one request/one response is absolutely correct. However, there are some tricks that can be employed to start another thread for a long-running process, display a wait message, and then monitor that thread.

This link gives one method for doing this. There are others. Just do some searching on the web.
 
Em Aiy
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
emm thanks. i tried to do some searching but can't find what i was looking for. That's why i thought to ask here.

I guess i need to search again. Thanks again!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic