Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
134
Chapter 6 Generating the Server Response: HTTP Status Codes
now. If the server thinks it can handle it later, it should include a 
Retry After
 response header. This value is new in HTTP 1.1. 
414 (Request URI Too Long)
The 414 (
SC_REQUEST_URI_TOO_LONG
) status is used when the URI is 
too long. In this context,  URI  means the part of the URL that came 
after the host and port in the URL. For example, in 
http://www.y2k disaster.com:8080/we/look/silly/now/
, the 
URI is 
/we/look/silly/now/
. This status code is new in HTTP 1.1. 
415 (Unsupported Media Type)
A value of 415 (
SC_UNSUPPORTED_MEDIA_TYPE
) means that the request 
had an attached document of a type the server doesn't know how to 
handle. This status code is new in HTTP 1.1. 
416 (Requested Range Not Satisfiable)
A status code of 416 signifies that the client included an unsatisfiable 
Range
 header in the request. This value is new in HTTP 1.1. Surpris 
ingly, the constant that corresponds to this value was omitted from 
HttpServletResponse
 in version 2.1 of the servlet API.
Core Note
In version 2.1 of the servlet specification, there is no 
SC_REQUESTED_RANGE_NOT_SATISFIABLE
 constant in 
HttpServletResponse
, so you have to use 416 explicitly. The constant 
is available in version 2.2 and later.
417 (Expectation Failed)
If the server receives an 
Expect
 request header with a value of 
100 continue
, it means that the client is asking if it can send an 
attached document in a follow up request. In such a case, the server 
should either respond with this status (417) to tell the browser it won't 
accept the document or use 100 (
SC_CONTINUE
) to tell the client to go 
ahead. This status code is new in HTTP 1.1. 
500 (Internal Server Error)
500 (
SC_INTERNAL_SERVER_ERROR
) is the generic  server is confused  
status code. It often results from CGI programs or (heaven forbid!) 
servlets that crash or return improperly formatted headers. 
Second edition of this book: www.coreservlets.com; Sequel: www.moreservlets.com.
Servlet and JSP training courses by book's author: courses.coreservlets.com.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

jsp web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Jsp Web Hosting Cheapest Web Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved