You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jg...@apache.org on 2006/03/14 08:05:43 UTC
svn commit: r385750 [1/5] - in /geronimo/specs/branches/jee5_exp: ./
geronimo-spec-servlet/ geronimo-spec-servlet/src/
geronimo-spec-servlet/src/main/ geronimo-spec-servlet/src/main/java/
geronimo-spec-servlet/src/main/java/javax/ geronimo-spec-servlet...
Author: jgenender
Date: Mon Mar 13 23:05:38 2006
New Revision: 385750
URL: http://svn.apache.org/viewcvs?rev=385750&view=rev
Log:
GERONIMO-1686: Add servlet spec for JEE5
Added:
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/LICENSE.txt
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/NOTICE.txt
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/pom.xml
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/Filter.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/FilterChain.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/FilterConfig.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/GenericServlet.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/RequestDispatcher.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/Servlet.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletConfig.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContext.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextAttributeEvent.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextAttributeListener.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextEvent.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextListener.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletException.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletInputStream.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletOutputStream.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequest.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestAttributeEvent.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestAttributeListener.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestEvent.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestListener.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestWrapper.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletResponse.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletResponseWrapper.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/SingleThreadedModel.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/UnavailableException.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/Cookie.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/HttpServlet.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/HttpServletRequest.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/HttpServletRequestWrapper.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/HttpServletResponse.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/HttpServletResponseWrapper.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/HttpSession.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/HttpSessionActivationListener.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/HttpSessionAttributeListener.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/HttpSessionBindingEvent.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/HttpSessionBindingListener.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/HttpSessionContext.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/HttpSessionEvent.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/HttpSessionListener.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/HttpUtils.java
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/LocalStrings.properties
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/resources/
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/resources/javax/
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/resources/javax/servlet/
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/resources/javax/servlet/resources/
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/resources/javax/servlet/resources/XMLSchema.dtd
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/resources/javax/servlet/resources/datatypes.dtd
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/resources/javax/servlet/resources/j2ee_1_4.xsd
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/resources/javax/servlet/resources/j2ee_web_services_1_1.xsd
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/resources/javax/servlet/resources/j2ee_web_services_client_1_1.xsd
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/resources/javax/servlet/resources/web-app_2_2.dtd
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/resources/javax/servlet/resources/web-app_2_3.dtd
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/resources/javax/servlet/resources/web-app_2_4.xsd
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/resources/javax/servlet/resources/web-app_2_5.xsd
geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/resources/javax/servlet/resources/xml.xsd
Modified:
geronimo/specs/branches/jee5_exp/pom.xml
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/LICENSE.txt
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/LICENSE.txt?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/LICENSE.txt (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/LICENSE.txt Mon Mar 13 23:05:38 2006
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/NOTICE.txt
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/NOTICE.txt?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/NOTICE.txt (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/NOTICE.txt Mon Mar 13 23:05:38 2006
@@ -0,0 +1,3 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/pom.xml
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/pom.xml?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/pom.xml (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/pom.xml Mon Mar 13 23:05:38 2006
@@ -0,0 +1,13 @@
+<project>
+ <parent>
+ <artifactId>jee5_exp_specs</artifactId>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-servlet_2.5_spec</artifactId>
+ <name>Servlet Spec</name>
+ <version>1.0-SNAPSHOT</version>
+ <description>The 2.5 Servlet spec jar.</description>
+</project>
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/Filter.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/Filter.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/Filter.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/Filter.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package javax.servlet;
+
+import java.io.IOException;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface Filter {
+ public void destroy();
+
+ public void doFilter(ServletRequest request, ServletResponse response,
+ FilterChain chain) throws IOException, ServletException;
+
+ public void init(FilterConfig filterConfig) throws ServletException;
+
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/FilterChain.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/FilterChain.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/FilterChain.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/FilterChain.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.IOException;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface FilterChain {
+ public void doFilter(ServletRequest request, ServletResponse response)
+ throws IOException, ServletException;
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/FilterConfig.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/FilterConfig.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/FilterConfig.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/FilterConfig.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.util.Enumeration;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface FilterConfig {
+ public String getFilterName();
+
+ public String getInitParameter(String name);
+
+ public Enumeration getInitParameterNames();
+
+ public ServletContext getServletContext();
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/GenericServlet.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/GenericServlet.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/GenericServlet.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/GenericServlet.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.Enumeration;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public abstract class GenericServlet implements Servlet, ServletConfig,
+ Serializable {
+ private transient ServletConfig config;
+
+ public GenericServlet() {
+ super();
+ }
+
+ public void destroy() {
+ }
+
+ public String getInitParameter(String name) {
+ return config.getInitParameter(name);
+ }
+
+ public Enumeration getInitParameterNames() {
+ return config.getInitParameterNames();
+ }
+
+ public ServletConfig getServletConfig() {
+ return config;
+ }
+
+ public ServletContext getServletContext() {
+ return config.getServletContext();
+ }
+
+ public String getServletInfo() {
+ return "";
+ }
+
+ public String getServletName() {
+ return config.getServletName();
+ }
+
+ public void init() throws ServletException {
+ }
+
+ public void init(ServletConfig config) throws ServletException {
+ this.config = config;
+ init();
+ }
+
+ public void log(String msg) {
+ config.getServletContext().log(msg);
+ }
+
+ public void log(String msg, Throwable t) {
+ config.getServletContext().log(msg, t);
+ }
+
+ public abstract void service(ServletRequest req, ServletResponse res)
+ throws ServletException, IOException;
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/RequestDispatcher.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/RequestDispatcher.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/RequestDispatcher.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/RequestDispatcher.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.IOException;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface RequestDispatcher {
+ public void forward(ServletRequest request, ServletResponse response)
+ throws ServletException, IOException;
+
+ public void include(ServletRequest request, ServletResponse response)
+ throws ServletException, IOException;
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/Servlet.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/Servlet.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/Servlet.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/Servlet.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.IOException;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface Servlet {
+ public void destroy();
+
+ public ServletConfig getServletConfig();
+
+ public String getServletInfo();
+
+ public void init(ServletConfig config) throws ServletException;
+
+ public void service(ServletRequest req, ServletResponse res)
+ throws ServletException, IOException;
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletConfig.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletConfig.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletConfig.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletConfig.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.util.Enumeration;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface ServletConfig {
+ public String getInitParameter(String name);
+
+ public Enumeration getInitParameterNames();
+
+ public ServletContext getServletContext();
+
+ public String getServletName();
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContext.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContext.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContext.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContext.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Set;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface ServletContext {
+ public Object getAttribute(String name);
+
+ public Enumeration getAttributeNames();
+
+ public ServletContext getContext(String uriPath);
+
+ public String getContextPath();
+
+ public String getInitParameter(String name);
+
+ public Enumeration getInitParameterNames();
+
+ public int getMajorVersion();
+
+ public String getMimeType(String file);
+
+ public int getMinorVersion();
+
+ public RequestDispatcher getNamedDispatcher(String name);
+
+ public String getRealPath(String path);
+
+ public RequestDispatcher getRequestDispatcher(String path);
+
+ public URL getResource(String path) throws MalformedURLException;
+
+ public InputStream getResourceAsStream(String path);
+
+ public Set getResourcePaths(String path);
+
+ public String getServerInfo();
+
+ @Deprecated
+ public Servlet getServlet(String name);
+
+ public String getServletContextName();
+
+ @Deprecated
+ public Enumeration getServletNames();
+
+ @Deprecated
+ public Enumeration getServlets();
+
+ @Deprecated
+ public void log(Exception e, String msg);
+
+ public void log(String msg);
+
+ public void log(String msg, Throwable t);
+
+ public void removeAttribute(String name);
+
+ public void setAttribute(String name, Object object);
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextAttributeEvent.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextAttributeEvent.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextAttributeEvent.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextAttributeEvent.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.Serializable;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class ServletContextAttributeEvent extends ServletContextEvent implements
+ Serializable {
+ private static final long serialVersionUID = 7126694965402446409L;
+ private String name;
+ private Object value;
+
+ public ServletContextAttributeEvent(ServletContext source, String name,
+ Object value) {
+ super(source);
+ this.name = name;
+ this.value = value;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextAttributeListener.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextAttributeListener.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextAttributeListener.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextAttributeListener.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.util.EventListener;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface ServletContextAttributeListener extends EventListener {
+ public void attributeAdded(ServletContextAttributeEvent event);
+
+ public void attributeRemoved(ServletContextAttributeEvent event);
+
+ public void attributeReplaced(ServletContextAttributeEvent event);
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextEvent.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextEvent.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextEvent.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextEvent.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.Serializable;
+import java.util.EventObject;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class ServletContextEvent extends EventObject implements Serializable {
+ private static final long serialVersionUID = 7661796801491598130L;
+ private ServletContext context;
+
+ public ServletContextEvent(ServletContext source) {
+ super(source);
+ context = source;
+ }
+
+ public ServletContext getServletContext() {
+ // should prob just cast and return source but parinoid
+ // of a class cast exception
+ return context;
+ }
+
+
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextListener.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextListener.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextListener.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletContextListener.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.util.EventListener;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface ServletContextListener extends EventListener {
+ public void contextDestroyed(ServletContextEvent event);
+
+ public void contextInitialized(ServletContextEvent event);
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletException.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletException.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletException.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletException.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.Serializable;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class ServletException extends Exception implements Serializable {
+ private static final long serialVersionUID = 7639550382612852862L;
+ public ServletException() {
+ super();
+ }
+ public ServletException(String msg) {
+ super(msg);
+ }
+ public ServletException(String msg, Throwable rootCause) {
+ super(msg, rootCause);
+ }
+ public ServletException(Throwable rootCause) {
+ super(rootCause);
+ }
+ public Throwable getRootCause() {
+ return this.getCause();
+ }
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletInputStream.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletInputStream.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletInputStream.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletInputStream.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public abstract class ServletInputStream extends InputStream {
+ protected ServletInputStream() {
+ }
+
+ public int readLine(byte[] b, int off, int len) throws IOException {
+ // copied from the 2.4 project @ geronimo
+ if (len <= 0) {
+ return 0;
+ }
+ int count = 0, c;
+
+ while ((c = read()) != -1) {
+ b[off++] = (byte) c;
+ count++;
+ if (c == '\n' || count == len) {
+ break;
+ }
+ }
+ return count > 0 ? count : -1;
+ }
+
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletOutputStream.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletOutputStream.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletOutputStream.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletOutputStream.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,120 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+//
+package javax.servlet;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.CharBuffer;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public abstract class ServletOutputStream extends OutputStream {
+ protected ServletOutputStream() {
+ }
+
+ public void print(boolean b) throws IOException {
+ if (b) {
+ print("true");
+ } else {
+ print("false");
+ }
+ }
+
+ public void print(char c) throws IOException {
+ print(String.valueOf(c));
+ }
+
+ public void print(double d) throws IOException {
+ print(String.valueOf(d));
+ }
+
+ public void print(float f) throws IOException {
+ print(String.valueOf(f));
+ }
+
+ public void print(int i) throws IOException {
+ print(String.valueOf(i));
+ }
+
+ public void print(long l) throws IOException {
+ print(String.valueOf(l));
+ }
+
+ public void print(String s) throws IOException {
+ try {
+ if (null == s)
+ s = "null";
+ CharBuffer buffer = CharBuffer.allocate(s.length());
+ buffer.put(s);
+ for (int i = 0; i < buffer.length(); i++) {
+ write(buffer.get(i));
+ }
+ } catch (IndexOutOfBoundsException e) {
+ IOException ioe = new IOException(
+ "buffer.get passed an out of bounds index");
+ ioe.initCause(e);
+ throw ioe;
+ }
+ }
+
+ public void println() throws IOException {
+ print("\r\n");
+ }
+
+ public void println(boolean b) throws IOException {
+ print(b);
+ println();
+ }
+
+ public void println(char c) throws IOException {
+ print(c);
+ println();
+ }
+
+ public void println(double d) throws IOException {
+ print(d);
+ println();
+ }
+
+ public void println(float f) throws IOException {
+ print(f);
+ println();
+ }
+
+ public void println(int i) throws IOException {
+ print(i);
+ println();
+ }
+
+ public void println(long l) throws IOException {
+ print(l);
+ println();
+ }
+
+ public void println(String s) throws IOException {
+ print(s);
+ println();
+ }
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequest.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequest.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequest.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequest.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface ServletRequest {
+ public Object getAttribute(String name);
+
+ public Enumeration getAttributeNames();
+
+ public String getCharacterEncoding();
+
+ public int getContentLength();
+
+ public String getContentType();
+
+ public ServletInputStream getInputStream() throws IOException;
+
+ public String getLocalAddr();
+
+ public Locale getLocale();
+
+ public Enumeration getLocales();
+
+ public String getLocalName();
+
+ public int getLocalPort();
+
+ public String getParameter(String name);
+
+ public Map getParameterMap();
+
+ public Enumeration getParameterNames();
+
+ public String[] getParameterValues(String name);
+
+ public String getProtocol();
+
+ public BufferedReader getReader() throws IOException;
+
+ @Deprecated
+ public String getRealPath(String path);
+
+ public String getRemoteAddr();
+
+ public String getRemoteHost();
+
+ public int getRemotePort();
+
+ public RequestDispatcher getRequestDispatcher(String path);
+
+ public String getScheme();
+
+ public String getServerName();
+
+ public int getServerPort();
+
+ public boolean isSecure();
+
+ public void removeAttribute(String name);
+
+ public void setAttribute(String name, Object value);
+
+ public void setCharacterEncoding(String charEncodingName)
+ throws UnsupportedEncodingException;
+
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestAttributeEvent.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestAttributeEvent.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestAttributeEvent.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestAttributeEvent.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.Serializable;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class ServletRequestAttributeEvent extends ServletRequestEvent implements
+ Serializable {
+ private static final long serialVersionUID = -5470426357466864241L;
+ private String name;
+ private Object value;
+
+ public ServletRequestAttributeEvent(ServletContext ctx,
+ ServletRequest request, String name, Object value) {
+ super(ctx, request);
+ this.name = name;
+ this.value = value;
+
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestAttributeListener.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestAttributeListener.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestAttributeListener.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestAttributeListener.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface ServletRequestAttributeListener {
+ public void attributeAdded(ServletRequestAttributeEvent event);
+
+ public void attributeRemoved(ServletRequestAttributeEvent event);
+
+ public void attributeReplaced(ServletRequestAttributeEvent event);
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestEvent.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestEvent.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestEvent.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestEvent.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.Serializable;
+import java.util.EventObject;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class ServletRequestEvent extends EventObject implements Serializable {
+ private static final long serialVersionUID = -7880378844975478647L;
+ private ServletContext context;
+ private ServletRequest request;
+
+ public ServletRequestEvent(ServletContext ctx, ServletRequest request) {
+ super(ctx);
+ this.context = ctx;
+ this.request = request;
+ }
+
+ public ServletContext getContext() {
+ return context;
+ }
+
+ public ServletRequest getRequest() {
+ return request;
+ }
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestListener.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestListener.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestListener.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestListener.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface ServletRequestListener {
+ public void requestDestroyed(ServletRequestEvent event);
+
+ public void requestInitialized(ServletRequestEvent event);
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestWrapper.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestWrapper.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestWrapper.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletRequestWrapper.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,174 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class ServletRequestWrapper implements ServletRequest {
+ private ServletRequest request;
+
+ public ServletRequestWrapper(ServletRequest request) {
+ if (request == null) {
+ throw new IllegalArgumentException("request can not be null");
+ }
+ this.request = request;
+ }
+
+ public Object getAttribute(String name) {
+ return request.getAttribute(name);
+ }
+
+ public Enumeration getAttributeNames() {
+ return request.getAttributeNames();
+ }
+
+ public String getCharacterEncoding() {
+ return request.getCharacterEncoding();
+ }
+
+ public int getContentLength() {
+ return request.getContentLength();
+ }
+
+ public String getContentType() {
+ return request.getContentType();
+ }
+
+ public ServletInputStream getInputStream()
+ throws IOException {
+ return request.getInputStream();
+ }
+
+ public String getLocalAddr() {
+ return request.getLocalAddr();
+ }
+
+ public Locale getLocale() {
+ return request.getLocale();
+ }
+
+ public Enumeration getLocales() {
+ return request.getLocales();
+ }
+
+ public String getLocalName() {
+ return request.getLocalName();
+ }
+
+ public int getLocalPort() {
+ return request.getLocalPort();
+ }
+
+ public String getParameter(String name) {
+ return request.getParameter(name);
+ }
+
+ public Map getParameterMap() {
+ return request.getParameterMap();
+ }
+
+ public Enumeration getParameterNames() {
+ return request.getParameterNames();
+ }
+
+ public String[] getParameterValues(String name) {
+ return request.getParameterValues(name);
+ }
+
+ public String getProtocol() {
+ return request.getProtocol();
+ }
+
+ public BufferedReader getReader() throws IOException {
+ return request.getReader();
+ }
+
+ @SuppressWarnings("deprecation")
+ public String getRealPath(String path) {
+ return request.getRealPath(path);
+ }
+
+ public String getRemoteAddr() {
+ return request.getRemoteAddr();
+ }
+
+ public String getRemoteHost() {
+ return request.getRemoteHost();
+ }
+
+ public int getRemotePort() {
+ return request.getRemotePort();
+ }
+
+ public ServletRequest getRequest() {
+ return request;
+ }
+
+ public RequestDispatcher getRequestDispatcher(String path) {
+ return request.getRequestDispatcher(path);
+ }
+
+ public String getScheme() {
+ return request.getScheme();
+ }
+
+ public String getServerName() {
+ return request.getServerName();
+ }
+
+ public int getServerPort() {
+ return request.getServerPort();
+ }
+
+ public boolean isSecure() {
+ return request.isSecure();
+ }
+
+ public void removeAttribute(String name) {
+ request.removeAttribute(name);
+ }
+
+ public void setAttribute(String name, Object value) {
+ request.setAttribute(name, value);
+ }
+
+ public void setCharacterEncoding(String charEncodingName)
+ throws UnsupportedEncodingException {
+ request.setCharacterEncoding(charEncodingName);
+ }
+
+ public void setRequest(ServletRequest request) {
+ if (request == null) {
+ throw new IllegalArgumentException("request can't be null");
+ }
+ this.request = request;
+ }
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletResponse.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletResponse.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletResponse.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletResponse.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Locale;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public interface ServletResponse {
+ public void flushBuffer() throws IOException;
+
+ public int getBufferSize();
+
+ public String getCharacterEncoding();
+
+ public String getContentType();
+
+ public Locale getLocale();
+
+ public ServletOutputStream getOutputStream() throws IOException;
+
+ public Writer getWriter() throws IOException;
+
+ public boolean isCommitted();
+
+ public void reset();
+
+ public void resetBuffer();
+
+ public void setBufferSize(int size);
+
+ public void setCharacterEncoding(String charset);
+
+ public void setContentLength(int len);
+
+ public void setContentType(String type);
+
+ public void setLocale(Locale locale);
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletResponseWrapper.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletResponseWrapper.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletResponseWrapper.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/ServletResponseWrapper.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Locale;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class ServletResponseWrapper implements ServletResponse {
+ private ServletResponse response;
+
+ public ServletResponseWrapper(ServletResponse response) {
+ setResponse(response);
+ }
+
+ public void flushBuffer() throws IOException {
+ response.flushBuffer();
+ }
+
+ public int getBufferSize() {
+ return response.getBufferSize();
+ }
+
+ public String getCharacterEncoding() {
+ return response.getCharacterEncoding();
+ }
+
+ public String getContentType() {
+ return response.getContentType();
+ }
+
+ public Locale getLocale() {
+ return response.getLocale();
+ }
+
+ public ServletOutputStream getOutputStream() throws IOException {
+ return response.getOutputStream();
+ }
+
+ public ServletResponse getResponse() {
+ return response;
+ }
+
+ public Writer getWriter() throws IOException {
+ return response.getWriter();
+ }
+
+ public boolean isCommitted() {
+ return response.isCommitted();
+ }
+
+ public void reset() {
+ response.reset();
+ }
+
+ public void resetBuffer() {
+ response.resetBuffer();
+ }
+
+ public void setBufferSize(int size) {
+ response.setBufferSize(size);
+ }
+
+ public void setCharacterEncoding(String charset) {
+ response.setCharacterEncoding(charset);
+ }
+
+ public void setContentLength(int len) {
+ response.setContentLength(len);
+ }
+
+ public void setContentType(String type) {
+ response.setContentType(type);
+ }
+
+ public void setLocale(Locale locale) {
+ response.setLocale(locale);
+ }
+
+ public void setResponse(ServletResponse response) {
+ if(response == null) {
+ throw new IllegalArgumentException("response can't be null");
+ }
+ this.response = response;
+ }
+
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/SingleThreadedModel.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/SingleThreadedModel.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/SingleThreadedModel.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/SingleThreadedModel.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+/**
+ * @version $Revision$ $Date$
+ */
+@Deprecated
+public interface SingleThreadedModel {
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/UnavailableException.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/UnavailableException.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/UnavailableException.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/UnavailableException.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet;
+
+import java.io.Serializable;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class UnavailableException extends ServletException implements
+ Serializable {
+ private static final long serialVersionUID = -8808724454979990506L;
+ private int unavalibleSeconds;
+ private Servlet servlet;
+ private boolean permanent;
+
+ @Deprecated
+ public UnavailableException(int seconds, Servlet servlet, String msg) {
+ this(msg, seconds);
+ this.servlet = servlet;
+ permanent = false;
+ }
+
+ @Deprecated
+ public UnavailableException(Servlet servlet, String msg) {
+ this(msg);
+ this.servlet = servlet;
+ permanent = true;
+ unavalibleSeconds = -1;
+ }
+
+ public UnavailableException(String msg) {
+ super(msg);
+ permanent = true;
+ unavalibleSeconds = -1;
+ }
+
+ public UnavailableException(String msg, int seconds) {
+ super(msg);
+ if (seconds < 0) {
+ unavalibleSeconds = -1;
+ } else {
+ unavalibleSeconds = seconds;
+ }
+ permanent = false;
+ }
+
+ @Deprecated
+ public Servlet getServlet() {
+ return servlet;
+ }
+
+ public int getUnavailableSeconds() {
+ return unavalibleSeconds;
+ }
+
+ public boolean isPermanent() {
+ return permanent;
+ }
+}
Added: geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/Cookie.java
URL: http://svn.apache.org/viewcvs/geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/Cookie.java?rev=385750&view=auto
==============================================================================
--- geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/Cookie.java (added)
+++ geronimo/specs/branches/jee5_exp/geronimo-spec-servlet/src/main/java/javax/servlet/http/Cookie.java Mon Mar 13 23:05:38 2006
@@ -0,0 +1,145 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.servlet.http;
+
+import java.text.MessageFormat;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public class Cookie implements Cloneable {
+ private String name;
+ private String value;
+ private String comment;
+ private String domain;
+ private int maxAge;
+ private String path;
+ private boolean secure;
+ private int version;
+ // Note -- disabled for now to allow full Netscape compatibility
+ // from RFC 2068, token special case characters
+ //
+ // private static final String tspecials = "()<>@,;:\\\"/[]?={} \t";
+ // copied from the 2.4 impl @ geronimo - is this still needed?
+ // Can we go back to the full list of specials?
+
+ private static final String tspecials = ",; ";
+
+ public Cookie(String name, String value) {
+ // copied from the 2.4 spec impl @ geronimo
+ if (!isToken(name) || name.equalsIgnoreCase("Comment") // rfc2019
+ || name.equalsIgnoreCase("Discard") // 2019++
+ || name.equalsIgnoreCase("Domain")
+ || name.equalsIgnoreCase("Expires") // (old cookies)
+ || name.equalsIgnoreCase("Max-Age") // rfc2019
+ || name.equalsIgnoreCase("Path")
+ || name.equalsIgnoreCase("Secure")
+ || name.equalsIgnoreCase("Version") || name.startsWith("$")) {
+ String errMsg = "Cookie name \"{0}\" is a reserved token";
+ Object[] errArgs = new Object[1];
+ errArgs[0] = name;
+ errMsg = MessageFormat.format(errMsg, errArgs);
+ throw new IllegalArgumentException(errMsg);
+ }
+
+ this.name = name;
+ this.value = value;
+ }
+
+ private boolean isToken(String value) {
+ int len = value.length();
+
+ for (int i = 0; i < len; i++) {
+ char c = value.charAt(i);
+
+ if (c < 0x20 || c >= 0x7f || tspecials.indexOf(c) != -1)
+ return false;
+ }
+ return true;
+ }
+
+ public Object clone() {
+ return new Cookie(name, value);
+ }
+
+ public String getComment() {
+ return comment;
+ }
+
+ public String getDomain() {
+ return domain;
+ }
+
+ public int getMaxAge() {
+ return maxAge;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public boolean getSecure() {
+ return secure;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public int getVersion() {
+ return version;
+ }
+
+ public void setComment(String comment) {
+ this.comment = comment;
+ }
+
+ public void setDomain(String domain) {
+ // copied from the 2.4 impl @ geronimo
+ this.domain = domain.toLowerCase(); // IE allegedly needs this
+ }
+
+ public void setMaxAge(int maxAge) {
+ this.maxAge = maxAge;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public void setSecure(boolean secure) {
+ this.secure = secure;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public void setVersion(int version) {
+ this.version = version;
+ }
+}