• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

partial response

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when i am forwarding a request to another servlet or jsp i am not getting the partial response generated by the first servlet..whathappens exactly tothe already generated response ..will it be over ridden by the second servlet or will it be ignoredby the container
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The initial response is written to a buffer. If the buffer fills it gets sent as is considered 'committed', if you farward after his point you gaet an IllegalStateException. If you forward before the buffer fills the buffer gets cleared (ie deleted) and starts from scratch.

In general it is a bad idea to rely on the buffer to manage this behaviour. It is better to decide whether to show A or B and only show that resource, rather than showing one and then changing your mind, hoping it won't fail horribly.
 
Trust God, but always tether your camel... to this tiny ad.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic