Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scwcd question - flusing response buffer?

 
Subbaiah Annamalai
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • 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.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Answare is
----------------------------
sendError()
flushBuffer()
sendRedirect()
-----------------------------
 
Subbaiah Annamalai
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.

Can you plese give explanation or direct me to the sections in Servlet Spec?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic