• Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference in status and error codes  RSS feed

 
amarkirt saroay
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the Difference in status and error codes?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Error codes are status codes.
 
Katrin Perry
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My understanding is that:
Error codes are codes 4xx and 5xx. They could be used with sendError. If included in the response (programmatically-sendError or by the container) they would invoke the error mechaninsm, if there are error entries in web.xml like this one:

<error-page>
<error-code>404</error-code>
<location>/error404.html</location>
</error-page>


The setStatus method is used to set status (information) responses (2xx and 3xx) and would not trigger the error mechanism.

I hope that this helps.

Thanks
Katrin

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!