• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Qn on setStatus and sendError

 
Chandrakanth
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How in the following qn, the answer is c....

The sendError method defined in the HttpServlet class is equivalent to invoking the setStatus method with the following parameter. Select the one correct answer.

a.SC_OK
b. SC_MOVED_TEMPORARILY
c. SC_NOT_FOUND
d. SC_INTERNAL_SERVER_ERROR
e. ESC_BAD_REQUEST

Ans given is:
C. sendError(String URL) is equivalent to sending SC_NOT_FOUND (404) response code.
 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this question come under scwcd1.4???
 
Chandrakanth
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i think so....not sure
 
Scott Johnson
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see a reference to a sendError(String) method in the servlet 2.4 spec. Just sendError(int) and sendError(int, String).

I think the question is incorrect.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic