• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sendError doubt??

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ranchers,

The question below is from j2eecertificate...

Which of the following statements are correct about the sendError method in the HttpServletResponse interface? [Check all correct answers]

1
Sends an error response to the client using the specified status.

2
Sends an error response to the server using the specified status.

3
The sendError method changes the content-type to text/html.

4
The sendError method leaves any cookies and headers unmodified.

5
The buffer needs to be committed manually after using the sendError method.

How option 3 is correct??
 
NDP Prasad
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The sendError method changes the content-type to text/html


User may change the contentType. But still it should be
The sendError method may change the content-type to text/html
 
NDP Prasad
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The sendError method changes the content-type to text/html


User may change the contentType in the errorpage. But still it should be
The sendError method may change the content-type to text/html
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So whatever may be the contentType set by the user, the sendError method changes it to text/html...Am I right?
 
NDP Prasad
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think default is text/html, I have studied somewhere..Not sure.
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic