Computer Science · Web Technology
The status line of a Servlet response consists of the HTTP version, a status code, and a short message corresponding to the status code. Which of the following statements correctly signify the purpose or usage of status codes? (i) A general method of setting a status code is simply to call response.setStatus(int) (ii) Setting a status code does not necessarily mean that you do not need to return a document (iii) In most cases, headers are optional (iv) It is more reliable to use constants defined in HttpServletResponse
- 1(i) and (ii) only
- 2(i), (ii) and (iv)✓
- 3(ii), (iii) and (iv)
- 4(i), (ii) and (iii)
Correct answer
(i), (ii) and (iv)
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Web Technology?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Web Technology