Source Code Cross Referenced for HttpServletResponse.java in  » EJB-Server-resin-3.1.5 » jsdk » javax » servlet » http » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server resin 3.1.5 » jsdk » javax.servlet.http 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (c) 1998-2001 Caucho Technology -- all rights reserved
003:         *
004:         * This file is part of Resin(R) Open Source
005:         *
006:         * Each copy or derived work must preserve the copyright notice and this
007:         * notice unmodified.
008:         *
009:         * Resin Open Source is free software; you can redistribute it and/or modify
010:         * it under the terms of the GNU General Public License as published by
011:         * the Free Software Foundation; either version 2 of the License, or
012:         * (at your option) any later version.
013:         *
014:         * Resin Open Source is distributed in the hope that it will be useful,
015:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
016:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017:         * of NON-INFRINGEMENT.  See the GNU General Public License for more
018:         * details.
019:         *
020:         * You should have received a copy of the GNU General Public License
021:         * along with Resin Open Source; if not, write to the
022:         *   Free SoftwareFoundation, Inc.
023:         *   59 Temple Place, Suite 330
024:         *   Boston, MA 02111-1307  USA
025:         *
026:         * @author Scott Ferguson
027:         */
028:
029:        package javax.servlet.http;
030:
031:        import javax.servlet.ServletResponse;
032:        import java.io.IOException;
033:
034:        /**
035:         * HttpServletResponse extends ServletResponse allowing servlets to
036:         * set the status and headers.
037:         *
038:         * <h4>Useful Headers</h4>
039:         *
040:         * <table>
041:         * <tr><td>Expires
042:         *     <td>Lets clients cache the page.  Resin can use Expires to
043:         *         internally cache the page.
044:         * </table>
045:         */
046:        public interface HttpServletResponse extends ServletResponse {
047:            public final static int SC_ACCEPTED = 202;
048:            public final static int SC_BAD_GATEWAY = 502;
049:            public final static int SC_BAD_REQUEST = 400;
050:            public final static int SC_CONFLICT = 409;
051:            public final static int SC_CONTINUE = 100;
052:            public final static int SC_CREATED = 201;
053:            public final static int SC_EXPECTATION_FAILED = 417;
054:            public final static int SC_FORBIDDEN = 403;
055:            public final static int SC_GATEWAY_TIMEOUT = 504;
056:            public final static int SC_GONE = 410;
057:            public final static int SC_HTTP_VERSION_NOT_SUPPORTED = 505;
058:            public final static int SC_INTERNAL_SERVER_ERROR = 500;
059:            public final static int SC_LENGTH_REQUIRED = 411;
060:            public final static int SC_METHOD_NOT_ALLOWED = 405;
061:            public final static int SC_MOVED_PERMANENTLY = 301;
062:            public final static int SC_MOVED_TEMPORARILY = 302;
063:            public final static int SC_FOUND = 302;
064:            public final static int SC_MULTIPLE_CHOICES = 300;
065:            public final static int SC_NO_CONTENT = 204;
066:            public final static int SC_NON_AUTHORITATIVE_INFORMATION = 203;
067:            public final static int SC_NOT_ACCEPTABLE = 406;
068:            public final static int SC_NOT_FOUND = 404;
069:            public final static int SC_NOT_IMPLEMENTED = 501;
070:            public final static int SC_NOT_MODIFIED = 304;
071:            public final static int SC_OK = 200;
072:            public final static int SC_PARTIAL_CONTENT = 206;
073:            public final static int SC_PAYMENT_REQUIRED = 402;
074:            public final static int SC_PRECONDITION_FAILED = 412;
075:            public final static int SC_PROXY_AUTHENTICATION_REQUIRED = 407;
076:            public final static int SC_REQUEST_ENTITY_TOO_LARGE = 413;
077:            public final static int SC_REQUEST_TIMEOUT = 408;
078:            public final static int SC_REQUEST_URI_TOO_LONG = 414;
079:            public final static int SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
080:            public final static int SC_RESET_CONTENT = 205;
081:            public final static int SC_SEE_OTHER = 303;
082:            public final static int SC_SERVICE_UNAVAILABLE = 503;
083:            public final static int SC_SWITCHING_PROTOCOLS = 101;
084:            public final static int SC_UNAUTHORIZED = 401;
085:            public final static int SC_UNSUPPORTED_MEDIA_TYPE = 415;
086:            public final static int SC_USE_PROXY_TYPE = 305;
087:
088:            /**
089:             * Sets the HTTP status
090:             *
091:             * @param sc the HTTP status code
092:             */
093:            public void setStatus(int sc);
094:
095:            /**
096:             * Sends an HTTP error page based on the status code
097:             *
098:             * @param sc the HTTP status code
099:             */
100:            public void sendError(int sc, String msg) throws IOException;
101:
102:            /**
103:             * Sends an HTTP error page based on the status code
104:             *
105:             * @param sc the HTTP status code
106:             */
107:            public void sendError(int sc) throws IOException;
108:
109:            /**
110:             * Redirects the client to another page.
111:             *
112:             * @param location the location to redirect to.
113:             */
114:            public void sendRedirect(String location) throws IOException;
115:
116:            /**
117:             * Sets a header.  This will override a previous header
118:             * with the same name.
119:             *
120:             * @param name the header name
121:             * @param value the header value
122:             */
123:            public void setHeader(String name, String value);
124:
125:            /**
126:             * Adds a header.  If another header with the same name exists, both
127:             * will be sent to the client.
128:             *
129:             * @param name the header name
130:             * @param value the header value
131:             */
132:            public void addHeader(String name, String value);
133:
134:            /**
135:             * Returns true if the output headers include <code>name</code>
136:             *
137:             * @param name the header name to test
138:             */
139:            public boolean containsHeader(String name);
140:
141:            /**
142:             * Sets a header by converting a date to a string.
143:             *
144:             * <p>To set the page to expire in 15 seconds use the following:
145:             * <pre><code>
146:             * long now = System.currentTime();
147:             * response.setDateHeader("Expires", now + 15000);
148:             * </code></pre>
149:             *
150:             * @param name name of the header
151:             * @param date the date in milliseconds since the epoch.
152:             */
153:            public void setDateHeader(String name, long date);
154:
155:            /**
156:             * Adds a header by converting a date to a string.
157:             *
158:             * @param name name of the header
159:             * @param date the date in milliseconds since the epoch.
160:             */
161:            public void addDateHeader(String name, long date);
162:
163:            /**
164:             * Sets a header by converting an integer value to a string.
165:             *
166:             * @param name name of the header
167:             * @param value the value as an integer
168:             */
169:            public void setIntHeader(String name, int value);
170:
171:            /**
172:             * Adds a header by converting an integer value to a string.
173:             *
174:             * @param name name of the header
175:             * @param value the value as an integer
176:             */
177:            public void addIntHeader(String name, int value);
178:
179:            /**
180:             * Sends a new cookie to the client.
181:             */
182:            public void addCookie(Cookie cookie);
183:
184:            /**
185:             * Encodes session information in a URL. Calling this will enable
186:             * sessions for users who have disabled cookies.
187:             *
188:             * @param url the url to encode
189:             * @return a url with session information encoded
190:             */
191:            public String encodeURL(String url);
192:
193:            /**
194:             * Encodes session information in a URL suitable for
195:             * <code>sendRedirect()</code> 
196:             *
197:             * @param url the url to encode
198:             * @return a url with session information encoded
199:             */
200:            public String encodeRedirectURL(String name);
201:
202:            /**
203:             * @deprecated
204:             */
205:            public void setStatus(int sc, String msg);
206:
207:            /**
208:             * @deprecated
209:             */
210:            public String encodeUrl(String url);
211:
212:            /**
213:             * @deprecated
214:             */
215:            public String encodeRedirectUrl(String url);
216:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.