This week's book giveaway is in the Testing forum.
We're giving away four copies of Data Structures the Fun Way: An Amusing Adventure with Coffee-Filled Examples and have Jeremy Kubica on-line!
See this thread for details.
  • 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

scwcd question - flusing response buffer?

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I'm preparing for SCWCD exam. I came across a sample question from Sun website (Free Proficiency Assessment) for SCWCD. Hope you can help me with this.

Q: Which three, when called on an HttpServletResponse object, always result in all remaining content in the response buffer being flushed to the client? (Choose Three)

Choices:

sendError()
setStatus()
flushBuffer()
sendRedirect()
getOutputStream()
getOutputStream().println()

I referred Servlet Specification and it is mentioned that flushBuffer() flushes content to client but setStatus & sendError clears the buffer before sending data to client. so setStatus & sendError doesnt seem to be the right answer for this question. The last 3 choices also doesnt seem to be right. The questions asks to pick 3 answers. Is it something wrong with this question or am i missing something? please let me know what is the right answer for this question.
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Answare is
----------------------------
sendError()
flushBuffer()
sendRedirect()
-----------------------------
 
Subbaiah Annamalai
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply.

Can you plese give explanation or direct me to the sections in Servlet Spec?
 
Evildoers! Eat my justice! And this tiny ad's justice too!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic