• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

can a servlet response multiple times to single request

 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ...
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic