Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
6.2 HTTP 1.1 Status Codes and Their Purpose
131
305 (Use Proxy)
A value of 305 (
SC_USE_PROXY
) signifies that the requested document 
should be retrieved via the proxy listed in the 
Location
 header. This 
status code is new in HTTP 1.1. 
307 (Temporary Redirect)
The rules for how a browser should handle a 307 status are identical to 
those for 302. The 307 value was added to HTTP 1.1 since many brows 
ers erroneously follow the redirection on a 302 response even if the 
original message is a 
POST
. Browsers are supposed to follow the redirec 
tion of a 
POST
 request only when they receive a 303 response status. 
This new status is intended to be unambiguously clear: follow redi 
rected 
GET
 and 
POST
 requests in the case of 303 responses; follow redi 
rected 
GET
 but not 
POST
 requests in the case of 307 responses. Note: 
For some reason there is no constant in 
HttpServletResponse
 corre 
sponding to this status code. This status code is new in HTTP 1.1. 
Core Note
There is no 
SC_TEMPORARY_REDIRECT
 constant in 
HttpServletResponse
, so you have to use 307 explicitly.
400 (Bad Request)
A 400 (
SC_BAD_REQUEST
) status indicates bad syntax in the client 
request. 
401 (Unauthorized)
A value of 401 (
SC_UNAUTHORIZED
) signifies that the client tried to 
access a password protected page without proper identifying informa 
tion in the 
Authorization
 header. The response must include a 
WWW Authenticate
 header. For an example, see Section 4.5,  Restrict 
ing Access to Web Pages. 
403 (Forbidden)
A status code of 403 (
SC_FORBIDDEN
) means that the server refuses to 
supply the resource, regardless of authorization. This status is often the 
result of bad file or directory permissions on the server. 
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