1 17 package javax.servlet.http; 18 19 import java.io.IOException ; 20 21 import javax.servlet.ServletResponse ; 22 23 40 41 42 43 public interface HttpServletResponse extends ServletResponse { 44 45 52 53 public void addCookie(Cookie cookie); 54 55 64 65 public boolean containsHeader(String name); 66 67 84 85 public String encodeURL(String url); 86 87 109 110 public String encodeRedirectURL(String url); 111 112 119 120 public String encodeUrl(String url); 121 122 130 131 public String encodeRedirectUrl(String url); 132 133 154 155 public void sendError(int sc, String msg) throws IOException ; 156 157 170 171 public void sendError(int sc) throws IOException ; 172 173 192 193 public void sendRedirect(String location) throws IOException ; 194 195 210 211 public void setDateHeader(String name, long date); 212 213 225 226 public void addDateHeader(String name, long date); 227 228 244 245 public void setHeader(String name, String value); 246 247 259 260 public void addHeader(String name, String value); 261 262 275 276 public void setIntHeader(String name, int value); 277 278 288 289 public void addIntHeader(String name, int value); 290 291 292 293 307 308 public void setStatus(int sc); 309 310 321 322 public void setStatus(int sc, String sm); 323 324 325 328 329 332 333 public static final int SC_CONTINUE = 100; 334 335 336 340 341 public static final int SC_SWITCHING_PROTOCOLS = 101; 342 343 346 347 public static final int SC_OK = 200; 348 349 353 354 public static final int SC_CREATED = 201; 355 356 360 361 public static final int SC_ACCEPTED = 202; 362 363 367 368 public static final int SC_NON_AUTHORITATIVE_INFORMATION = 203; 369 370 374 375 public static final int SC_NO_CONTENT = 204; 376 377 381 382 public static final int SC_RESET_CONTENT = 205; 383 384 388 389 public static final int SC_PARTIAL_CONTENT = 206; 390 391 396 397 public static final int SC_MULTIPLE_CHOICES = 300; 398 399 404 405 public static final int SC_MOVED_PERMANENTLY = 301; 406 407 415 416 public static final int SC_MOVED_TEMPORARILY = 302; 417 418 425 426 public static final int SC_FOUND = 302; 427 428 432 433 public static final int SC_SEE_OTHER = 303; 434 435 439 440 public static final int SC_NOT_MODIFIED = 304; 441 442 447 448 public static final int SC_USE_PROXY = 305; 449 450 456 457 public static final int SC_TEMPORARY_REDIRECT = 307; 458 459 463 464 public static final int SC_BAD_REQUEST = 400; 465 466 470 471 public static final int SC_UNAUTHORIZED = 401; 472 473 476 477 public static final int SC_PAYMENT_REQUIRED = 402; 478 479 483 484 public static final int SC_FORBIDDEN = 403; 485 486 490 491 public static final int SC_NOT_FOUND = 404; 492 493 498 499 public static final int SC_METHOD_NOT_ALLOWED = 405; 500 501 507 508 public static final int SC_NOT_ACCEPTABLE = 406; 509 510 514 515 public static final int SC_PROXY_AUTHENTICATION_REQUIRED = 407; 516 517 521 522 public static final int SC_REQUEST_TIMEOUT = 408; 523 524 529 530 public static final int SC_CONFLICT = 409; 531 532 537 538 public static final int SC_GONE = 410; 539 540 544 545 public static final int SC_LENGTH_REQUIRED = 411; 546 547 552 553 public static final int SC_PRECONDITION_FAILED = 412; 554 555 560 561 public static final int SC_REQUEST_ENTITY_TOO_LARGE = 413; 562 563 568 569 public static final int SC_REQUEST_URI_TOO_LONG = 414; 570 571 576 577 public static final int SC_UNSUPPORTED_MEDIA_TYPE = 415; 578 579 583 584 public static final int SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416; 585 586 590 591 public static final int SC_EXPECTATION_FAILED = 417; 592 593 597 598 public static final int SC_INTERNAL_SERVER_ERROR = 500; 599 600 604 605 public static final int SC_NOT_IMPLEMENTED = 501; 606 607 612 613 public static final int SC_BAD_GATEWAY = 502; 614 615 619 620 public static final int SC_SERVICE_UNAVAILABLE = 503; 621 622 627 628 public static final int SC_GATEWAY_TIMEOUT = 504; 629 630 635 636 public static final int SC_HTTP_VERSION_NOT_SUPPORTED = 505; 637 } 638 | Popular Tags |