You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2006/08/27 02:18:32 UTC
svn commit: r437256 [14/23] - in /geronimo/specs/trunk: ./
geronimo-activation_1.0.2_spec/
geronimo-activation_1.0.2_spec/src/main/java/javax/activation/
geronimo-activation_1.0.2_spec/src/test/java/javax/activation/
geronimo-commonj_1.1_spec/ geronimo...
Modified: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/Filter.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/Filter.java?rev=437256&r1=437255&r2=437256&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/Filter.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/Filter.java Sat Aug 26 17:17:49 2006
@@ -1,91 +1,91 @@
-/*
-* Copyright 2004 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.
-*/
-package javax.servlet;
-
-import java.io.IOException;
-
- /**
- * A filter is an object that performs filtering tasks on either the request to a resource (a servlet or static content), or on the response from a resource, or both.
- * <br><br>
- * Filters perform filtering in the <code>doFilter</code> method. Every Filter has access to
- ** a FilterConfig object from which it can obtain its initialization parameters, a
- ** reference to the ServletContext which it can use, for example, to load resources
- ** needed for filtering tasks.
- ** <p>
- ** Filters are configured in the deployment descriptor of a web application
- ** <p>
- ** Examples that have been identified for this design are<br>
- ** 1) Authentication Filters <br>
- ** 2) Logging and Auditing Filters <br>
- ** 3) Image conversion Filters <br>
- ** 4) Data compression Filters <br>
- ** 5) Encryption Filters <br>
- ** 6) Tokenizing Filters <br>
- ** 7) Filters that trigger resource access events <br>
- ** 8) XSL/T filters <br>
- ** 9) Mime-type chain Filter <br>
- * @since Servlet 2.3
- */
-
-public interface Filter {
-
- /**
- * Called by the web container to indicate to a filter that it is being placed into
- * service. The servlet container calls the init method exactly once after instantiating the
- * filter. The init method must complete successfully before the filter is asked to do any
- * filtering work. <br><br>
-
- * The web container cannot place the filter into service if the init method either<br>
- * 1.Throws a ServletException <br>
- * 2.Does not return within a time period defined by the web container
- */
- public void init(FilterConfig filterConfig) throws ServletException;
-
-
- /**
- * The <code>doFilter</code> method of the Filter is called by the container
- * each time a request/response pair is passed through the chain due
- * to a client request for a resource at the end of the chain. The FilterChain passed in to this
- * method allows the Filter to pass on the request and response to the next entity in the
- * chain.<p>
- * A typical implementation of this method would follow the following pattern:- <br>
- * 1. Examine the request<br>
- * 2. Optionally wrap the request object with a custom implementation to
- * filter content or headers for input filtering <br>
- * 3. Optionally wrap the response object with a custom implementation to
- * filter content or headers for output filtering <br>
- * 4. a) <strong>Either</strong> invoke the next entity in the chain using the FilterChain object (<code>chain.doFilter()</code>), <br>
- ** 4. b) <strong>or</strong> not pass on the request/response pair to the next entity in the filter chain to block the request processing<br>
- ** 5. Directly set headers on the response after invocation of the next entity in the filter chain.
- **/
- public void doFilter ( ServletRequest request, ServletResponse response, FilterChain chain ) throws IOException, ServletException;
-
- /**
- * Called by the web container to indicate to a filter that it is being taken out of service. This
- * method is only called once all threads within the filter's doFilter method have exited or after
- * a timeout period has passed. After the web container calls this method, it will not call the
- * doFilter method again on this instance of the filter. <br><br>
- *
- * This method gives the filter an opportunity to clean up any resources that are being held (for
- * example, memory, file handles, threads) and make sure that any persistent state is synchronized
- * with the filter's current state in memory.
- */
-
- public void destroy();
-
-
-}
-
+/*
+* Copyright 2004 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.
+*/
+package javax.servlet;
+
+import java.io.IOException;
+
+ /**
+ * A filter is an object that performs filtering tasks on either the request to a resource (a servlet or static content), or on the response from a resource, or both.
+ * <br><br>
+ * Filters perform filtering in the <code>doFilter</code> method. Every Filter has access to
+ ** a FilterConfig object from which it can obtain its initialization parameters, a
+ ** reference to the ServletContext which it can use, for example, to load resources
+ ** needed for filtering tasks.
+ ** <p>
+ ** Filters are configured in the deployment descriptor of a web application
+ ** <p>
+ ** Examples that have been identified for this design are<br>
+ ** 1) Authentication Filters <br>
+ ** 2) Logging and Auditing Filters <br>
+ ** 3) Image conversion Filters <br>
+ ** 4) Data compression Filters <br>
+ ** 5) Encryption Filters <br>
+ ** 6) Tokenizing Filters <br>
+ ** 7) Filters that trigger resource access events <br>
+ ** 8) XSL/T filters <br>
+ ** 9) Mime-type chain Filter <br>
+ * @since Servlet 2.3
+ */
+
+public interface Filter {
+
+ /**
+ * Called by the web container to indicate to a filter that it is being placed into
+ * service. The servlet container calls the init method exactly once after instantiating the
+ * filter. The init method must complete successfully before the filter is asked to do any
+ * filtering work. <br><br>
+
+ * The web container cannot place the filter into service if the init method either<br>
+ * 1.Throws a ServletException <br>
+ * 2.Does not return within a time period defined by the web container
+ */
+ public void init(FilterConfig filterConfig) throws ServletException;
+
+
+ /**
+ * The <code>doFilter</code> method of the Filter is called by the container
+ * each time a request/response pair is passed through the chain due
+ * to a client request for a resource at the end of the chain. The FilterChain passed in to this
+ * method allows the Filter to pass on the request and response to the next entity in the
+ * chain.<p>
+ * A typical implementation of this method would follow the following pattern:- <br>
+ * 1. Examine the request<br>
+ * 2. Optionally wrap the request object with a custom implementation to
+ * filter content or headers for input filtering <br>
+ * 3. Optionally wrap the response object with a custom implementation to
+ * filter content or headers for output filtering <br>
+ * 4. a) <strong>Either</strong> invoke the next entity in the chain using the FilterChain object (<code>chain.doFilter()</code>), <br>
+ ** 4. b) <strong>or</strong> not pass on the request/response pair to the next entity in the filter chain to block the request processing<br>
+ ** 5. Directly set headers on the response after invocation of the next entity in the filter chain.
+ **/
+ public void doFilter ( ServletRequest request, ServletResponse response, FilterChain chain ) throws IOException, ServletException;
+
+ /**
+ * Called by the web container to indicate to a filter that it is being taken out of service. This
+ * method is only called once all threads within the filter's doFilter method have exited or after
+ * a timeout period has passed. After the web container calls this method, it will not call the
+ * doFilter method again on this instance of the filter. <br><br>
+ *
+ * This method gives the filter an opportunity to clean up any resources that are being held (for
+ * example, memory, file handles, threads) and make sure that any persistent state is synchronized
+ * with the filter's current state in memory.
+ */
+
+ public void destroy();
+
+
+}
+
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/Filter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/Filter.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/Filter.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/FilterChain.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/FilterChain.java?rev=437256&r1=437255&r2=437256&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/FilterChain.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/FilterChain.java Sat Aug 26 17:17:49 2006
@@ -1,45 +1,45 @@
-/*
-* Copyright 2004 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.
-*/
-package javax.servlet;
-
-import java.io.IOException;
-
- /**
- * A FilterChain is an object provided by the servlet container to the developer
- * giving a view into the invocation chain of a filtered request for a resource. Filters
- * use the FilterChain to invoke the next filter in the chain, or if the calling filter
- * is the last filter in the chain, to invoke the resource at the end of the chain.
- *
- * @see Filter
- * @since Servlet 2.3
- **/
-
-public interface FilterChain {
-
- /**
- * Causes the next filter in the chain to be invoked, or if the calling filter is the last filter
- * in the chain, causes the resource at the end of the chain to be invoked.
- *
- * @param request the request to pass along the chain.
- * @param response the response to pass along the chain.
- *
- * @since 2.3
- */
-
- public void doFilter ( ServletRequest request, ServletResponse response ) throws IOException, ServletException;
-
-}
-
+/*
+* Copyright 2004 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.
+*/
+package javax.servlet;
+
+import java.io.IOException;
+
+ /**
+ * A FilterChain is an object provided by the servlet container to the developer
+ * giving a view into the invocation chain of a filtered request for a resource. Filters
+ * use the FilterChain to invoke the next filter in the chain, or if the calling filter
+ * is the last filter in the chain, to invoke the resource at the end of the chain.
+ *
+ * @see Filter
+ * @since Servlet 2.3
+ **/
+
+public interface FilterChain {
+
+ /**
+ * Causes the next filter in the chain to be invoked, or if the calling filter is the last filter
+ * in the chain, causes the resource at the end of the chain to be invoked.
+ *
+ * @param request the request to pass along the chain.
+ * @param response the response to pass along the chain.
+ *
+ * @since 2.3
+ */
+
+ public void doFilter ( ServletRequest request, ServletResponse response ) throws IOException, ServletException;
+
+}
+
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/FilterChain.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/FilterChain.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/FilterChain.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/FilterConfig.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/FilterConfig.java?rev=437256&r1=437255&r2=437256&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/FilterConfig.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/FilterConfig.java Sat Aug 26 17:17:49 2006
@@ -1,91 +1,91 @@
-/*
-* Copyright 2004 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.
-*/
-
-package javax.servlet;
-
-
-import java.util.Enumeration;
-
- /**
- *
- * A filter configuration object used by a servlet container
- * to pass information to a filter during initialization.
- * @see Filter
- * @since Servlet 2.3
- *
- */
-
-
-public interface FilterConfig {
-
- /**
- * Returns the filter-name of this filter as defined in the deployment descriptor.
- */
-
- public String getFilterName();
-
-
- /**
- * Returns a reference to the {@link ServletContext} in which the caller
- * is executing.
- *
- *
- * @return a {@link ServletContext} object, used
- * by the caller to interact with its servlet
- * container
- *
- * @see ServletContext
- *
- */
-
- public ServletContext getServletContext();
-
- /**
- * Returns a <code>String</code> containing the value of the
- * named initialization parameter, or <code>null</code> if
- * the parameter does not exist.
- *
- * @param name a <code>String</code> specifying the name
- * of the initialization parameter
- *
- * @return a <code>String</code> containing the value
- * of the initialization parameter
- *
- */
-
- public String getInitParameter(String name);
-
-
- /**
- * Returns the names of the filter's initialization parameters
- * as an <code>Enumeration</code> of <code>String</code> objects,
- * or an empty <code>Enumeration</code> if the filter has
- * no initialization parameters.
- *
- * @return an <code>Enumeration</code> of <code>String</code>
- * objects containing the names of the filter's
- * initialization parameters
- *
- *
- *
- */
-
- public Enumeration getInitParameterNames();
-
-
-
-
-}
+/*
+* Copyright 2004 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.
+*/
+
+package javax.servlet;
+
+
+import java.util.Enumeration;
+
+ /**
+ *
+ * A filter configuration object used by a servlet container
+ * to pass information to a filter during initialization.
+ * @see Filter
+ * @since Servlet 2.3
+ *
+ */
+
+
+public interface FilterConfig {
+
+ /**
+ * Returns the filter-name of this filter as defined in the deployment descriptor.
+ */
+
+ public String getFilterName();
+
+
+ /**
+ * Returns a reference to the {@link ServletContext} in which the caller
+ * is executing.
+ *
+ *
+ * @return a {@link ServletContext} object, used
+ * by the caller to interact with its servlet
+ * container
+ *
+ * @see ServletContext
+ *
+ */
+
+ public ServletContext getServletContext();
+
+ /**
+ * Returns a <code>String</code> containing the value of the
+ * named initialization parameter, or <code>null</code> if
+ * the parameter does not exist.
+ *
+ * @param name a <code>String</code> specifying the name
+ * of the initialization parameter
+ *
+ * @return a <code>String</code> containing the value
+ * of the initialization parameter
+ *
+ */
+
+ public String getInitParameter(String name);
+
+
+ /**
+ * Returns the names of the filter's initialization parameters
+ * as an <code>Enumeration</code> of <code>String</code> objects,
+ * or an empty <code>Enumeration</code> if the filter has
+ * no initialization parameters.
+ *
+ * @return an <code>Enumeration</code> of <code>String</code>
+ * objects containing the names of the filter's
+ * initialization parameters
+ *
+ *
+ *
+ */
+
+ public Enumeration getInitParameterNames();
+
+
+
+
+}
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/FilterConfig.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/FilterConfig.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/FilterConfig.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/GenericServlet.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/GenericServlet.java?rev=437256&r1=437255&r2=437256&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/GenericServlet.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/GenericServlet.java Sat Aug 26 17:17:49 2006
@@ -1,323 +1,323 @@
-/*
-* Copyright 2004 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.
-*/
-package javax.servlet;
-
-import java.io.IOException;
-import java.util.Enumeration;
-
-/**
- *
- * Defines a generic, protocol-independent
- * servlet. To write an HTTP servlet for use on the
- * Web, extend {@link javax.servlet.http.HttpServlet} instead.
- *
- * <p><code>GenericServlet</code> implements the <code>Servlet</code>
- * and <code>ServletConfig</code> interfaces. <code>GenericServlet</code>
- * may be directly extended by a servlet, although it's more common to extend
- * a protocol-specific subclass such as <code>HttpServlet</code>.
- *
- * <p><code>GenericServlet</code> makes writing servlets
- * easier. It provides simple versions of the lifecycle methods
- * <code>init</code> and <code>destroy</code> and of the methods
- * in the <code>ServletConfig</code> interface. <code>GenericServlet</code>
- * also implements the <code>log</code> method, declared in the
- * <code>ServletContext</code> interface.
- *
- * <p>To write a generic servlet, you need only
- * override the abstract <code>service</code> method.
- *
- *
- * @author Various
- * @version $Version$
- *
- *
- *
- */
-
-
-public abstract class GenericServlet
- implements Servlet, ServletConfig, java.io.Serializable
-{
-
- private transient ServletConfig config;
-
-
- /**
- *
- * Does nothing. All of the servlet initialization
- * is done by one of the <code>init</code> methods.
- *
- */
-
- public GenericServlet() { }
-
-
-
- /**
- * Called by the servlet container to indicate to a servlet that the
- * servlet is being taken out of service. See {@link Servlet#destroy}.
- *
- *
- */
-
- public void destroy() {
- }
-
-
-
- /**
- * Returns a <code>String</code> containing the value of the named
- * initialization parameter, or <code>null</code> if the parameter does
- * not exist. See {@link ServletConfig#getInitParameter}.
- *
- * <p>This method is supplied for convenience. It gets the
- * value of the named parameter from the servlet's
- * <code>ServletConfig</code> object.
- *
- * @param name a <code>String</code> specifying the name
- * of the initialization parameter
- *
- * @return String a <code>String</code> containing the value
- * of the initialization parameter
- *
- */
-
- public String getInitParameter(String name) {
- return getServletConfig().getInitParameter(name);
- }
-
-
-
- /**
- * Returns the names of the servlet's initialization parameters
- * as an <code>Enumeration</code> of <code>String</code> objects,
- * or an empty <code>Enumeration</code> if the servlet has no
- * initialization parameters. See {@link
- * ServletConfig#getInitParameterNames}.
- *
- * <p>This method is supplied for convenience. It gets the
- * parameter names from the servlet's <code>ServletConfig</code> object.
- *
- *
- * @return Enumeration an enumeration of <code>String</code>
- * objects containing the names of
- * the servlet's initialization parameters
- *
- */
-
- public Enumeration getInitParameterNames() {
- return getServletConfig().getInitParameterNames();
- }
-
-
-
-
-
- /**
- * Returns this servlet's {@link ServletConfig} object.
- *
- * @return ServletConfig the <code>ServletConfig</code> object
- * that initialized this servlet
- *
- */
-
- public ServletConfig getServletConfig() {
- return config;
- }
-
-
-
-
- /**
- * Returns a reference to the {@link ServletContext} in which this servlet
- * is running. See {@link ServletConfig#getServletContext}.
- *
- * <p>This method is supplied for convenience. It gets the
- * context from the servlet's <code>ServletConfig</code> object.
- *
- *
- * @return ServletContext the <code>ServletContext</code> object
- * passed to this servlet by the <code>init</code>
- * method
- *
- */
-
- public ServletContext getServletContext() {
- return getServletConfig().getServletContext();
- }
-
-
-
-
-
- /**
- * Returns information about the servlet, such as
- * author, version, and copyright.
- * By default, this method returns an empty string. Override this method
- * to have it return a meaningful value. See {@link
- * Servlet#getServletInfo}.
- *
- *
- * @return String information about this servlet, by default an
- * empty string
- *
- */
-
- public String getServletInfo() {
- return "";
- }
-
-
-
-
- /**
- *
- * Called by the servlet container to indicate to a servlet that the
- * servlet is being placed into service. See {@link Servlet#init}.
- *
- * <p>This implementation stores the {@link ServletConfig}
- * object it receives from the servlet container for later use.
- * When overriding this form of the method, call
- * <code>super.init(config)</code>.
- *
- * @param config the <code>ServletConfig</code> object
- * that contains configutation
- * information for this servlet
- *
- * @exception ServletException if an exception occurs that
- * interrupts the servlet's normal
- * operation
- *
- *
- * @see UnavailableException
- *
- */
-
- public void init(ServletConfig config) throws ServletException {
- this.config = config;
- this.init();
- }
-
-
-
-
-
- /**
- *
- * A convenience method which can be overridden so that there's no need
- * to call <code>super.init(config)</code>.
- *
- * <p>Instead of overriding {@link #init(ServletConfig)}, simply override
- * this method and it will be called by
- * <code>GenericServlet.init(ServletConfig config)</code>.
- * The <code>ServletConfig</code> object can still be retrieved via {@link
- * #getServletConfig}.
- *
- * @exception ServletException if an exception occurs that
- * interrupts the servlet's
- * normal operation
- *
- */
-
- public void init() throws ServletException {
-
- }
-
-
-
-
- /**
- *
- * Writes the specified message to a servlet log file, prepended by the
- * servlet's name. See {@link ServletContext#log(String)}.
- *
- * @param msg a <code>String</code> specifying
- * the message to be written to the log file
- *
- */
-
- public void log(String msg) {
- getServletContext().log(getServletName() + ": "+ msg);
- }
-
-
-
-
- /**
- * Writes an explanatory message and a stack trace
- * for a given <code>Throwable</code> exception
- * to the servlet log file, prepended by the servlet's name.
- * See {@link ServletContext#log(String, Throwable)}.
- *
- *
- * @param message a <code>String</code> that describes
- * the error or exception
- *
- * @param t the <code>java.lang.Throwable</code> error
- * or exception
- *
- *
- */
-
- public void log(String message, Throwable t) {
- getServletContext().log(getServletName() + ": " + message, t);
- }
-
-
-
- /**
- * Called by the servlet container to allow the servlet to respond to
- * a request. See {@link Servlet#service}.
- *
- * <p>This method is declared abstract so subclasses, such as
- * <code>HttpServlet</code>, must override it.
- *
- *
- *
- * @param req the <code>ServletRequest</code> object
- * that contains the client's request
- *
- * @param res the <code>ServletResponse</code> object
- * that will contain the servlet's response
- *
- * @exception ServletException if an exception occurs that
- * interferes with the servlet's
- * normal operation occurred
- *
- * @exception IOException if an input or output
- * exception occurs
- *
- */
-
- public abstract void service(ServletRequest req, ServletResponse res)
- throws ServletException, IOException;
-
-
-
- /**
- * Returns the name of this servlet instance.
- * See {@link ServletConfig#getServletName}.
- *
- * @return the name of this servlet instance
- *
- *
- *
- */
-
- public String getServletName() {
- return config.getServletName();
- }
-}
+/*
+* Copyright 2004 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.
+*/
+package javax.servlet;
+
+import java.io.IOException;
+import java.util.Enumeration;
+
+/**
+ *
+ * Defines a generic, protocol-independent
+ * servlet. To write an HTTP servlet for use on the
+ * Web, extend {@link javax.servlet.http.HttpServlet} instead.
+ *
+ * <p><code>GenericServlet</code> implements the <code>Servlet</code>
+ * and <code>ServletConfig</code> interfaces. <code>GenericServlet</code>
+ * may be directly extended by a servlet, although it's more common to extend
+ * a protocol-specific subclass such as <code>HttpServlet</code>.
+ *
+ * <p><code>GenericServlet</code> makes writing servlets
+ * easier. It provides simple versions of the lifecycle methods
+ * <code>init</code> and <code>destroy</code> and of the methods
+ * in the <code>ServletConfig</code> interface. <code>GenericServlet</code>
+ * also implements the <code>log</code> method, declared in the
+ * <code>ServletContext</code> interface.
+ *
+ * <p>To write a generic servlet, you need only
+ * override the abstract <code>service</code> method.
+ *
+ *
+ * @author Various
+ * @version $Version$
+ *
+ *
+ *
+ */
+
+
+public abstract class GenericServlet
+ implements Servlet, ServletConfig, java.io.Serializable
+{
+
+ private transient ServletConfig config;
+
+
+ /**
+ *
+ * Does nothing. All of the servlet initialization
+ * is done by one of the <code>init</code> methods.
+ *
+ */
+
+ public GenericServlet() { }
+
+
+
+ /**
+ * Called by the servlet container to indicate to a servlet that the
+ * servlet is being taken out of service. See {@link Servlet#destroy}.
+ *
+ *
+ */
+
+ public void destroy() {
+ }
+
+
+
+ /**
+ * Returns a <code>String</code> containing the value of the named
+ * initialization parameter, or <code>null</code> if the parameter does
+ * not exist. See {@link ServletConfig#getInitParameter}.
+ *
+ * <p>This method is supplied for convenience. It gets the
+ * value of the named parameter from the servlet's
+ * <code>ServletConfig</code> object.
+ *
+ * @param name a <code>String</code> specifying the name
+ * of the initialization parameter
+ *
+ * @return String a <code>String</code> containing the value
+ * of the initialization parameter
+ *
+ */
+
+ public String getInitParameter(String name) {
+ return getServletConfig().getInitParameter(name);
+ }
+
+
+
+ /**
+ * Returns the names of the servlet's initialization parameters
+ * as an <code>Enumeration</code> of <code>String</code> objects,
+ * or an empty <code>Enumeration</code> if the servlet has no
+ * initialization parameters. See {@link
+ * ServletConfig#getInitParameterNames}.
+ *
+ * <p>This method is supplied for convenience. It gets the
+ * parameter names from the servlet's <code>ServletConfig</code> object.
+ *
+ *
+ * @return Enumeration an enumeration of <code>String</code>
+ * objects containing the names of
+ * the servlet's initialization parameters
+ *
+ */
+
+ public Enumeration getInitParameterNames() {
+ return getServletConfig().getInitParameterNames();
+ }
+
+
+
+
+
+ /**
+ * Returns this servlet's {@link ServletConfig} object.
+ *
+ * @return ServletConfig the <code>ServletConfig</code> object
+ * that initialized this servlet
+ *
+ */
+
+ public ServletConfig getServletConfig() {
+ return config;
+ }
+
+
+
+
+ /**
+ * Returns a reference to the {@link ServletContext} in which this servlet
+ * is running. See {@link ServletConfig#getServletContext}.
+ *
+ * <p>This method is supplied for convenience. It gets the
+ * context from the servlet's <code>ServletConfig</code> object.
+ *
+ *
+ * @return ServletContext the <code>ServletContext</code> object
+ * passed to this servlet by the <code>init</code>
+ * method
+ *
+ */
+
+ public ServletContext getServletContext() {
+ return getServletConfig().getServletContext();
+ }
+
+
+
+
+
+ /**
+ * Returns information about the servlet, such as
+ * author, version, and copyright.
+ * By default, this method returns an empty string. Override this method
+ * to have it return a meaningful value. See {@link
+ * Servlet#getServletInfo}.
+ *
+ *
+ * @return String information about this servlet, by default an
+ * empty string
+ *
+ */
+
+ public String getServletInfo() {
+ return "";
+ }
+
+
+
+
+ /**
+ *
+ * Called by the servlet container to indicate to a servlet that the
+ * servlet is being placed into service. See {@link Servlet#init}.
+ *
+ * <p>This implementation stores the {@link ServletConfig}
+ * object it receives from the servlet container for later use.
+ * When overriding this form of the method, call
+ * <code>super.init(config)</code>.
+ *
+ * @param config the <code>ServletConfig</code> object
+ * that contains configutation
+ * information for this servlet
+ *
+ * @exception ServletException if an exception occurs that
+ * interrupts the servlet's normal
+ * operation
+ *
+ *
+ * @see UnavailableException
+ *
+ */
+
+ public void init(ServletConfig config) throws ServletException {
+ this.config = config;
+ this.init();
+ }
+
+
+
+
+
+ /**
+ *
+ * A convenience method which can be overridden so that there's no need
+ * to call <code>super.init(config)</code>.
+ *
+ * <p>Instead of overriding {@link #init(ServletConfig)}, simply override
+ * this method and it will be called by
+ * <code>GenericServlet.init(ServletConfig config)</code>.
+ * The <code>ServletConfig</code> object can still be retrieved via {@link
+ * #getServletConfig}.
+ *
+ * @exception ServletException if an exception occurs that
+ * interrupts the servlet's
+ * normal operation
+ *
+ */
+
+ public void init() throws ServletException {
+
+ }
+
+
+
+
+ /**
+ *
+ * Writes the specified message to a servlet log file, prepended by the
+ * servlet's name. See {@link ServletContext#log(String)}.
+ *
+ * @param msg a <code>String</code> specifying
+ * the message to be written to the log file
+ *
+ */
+
+ public void log(String msg) {
+ getServletContext().log(getServletName() + ": "+ msg);
+ }
+
+
+
+
+ /**
+ * Writes an explanatory message and a stack trace
+ * for a given <code>Throwable</code> exception
+ * to the servlet log file, prepended by the servlet's name.
+ * See {@link ServletContext#log(String, Throwable)}.
+ *
+ *
+ * @param message a <code>String</code> that describes
+ * the error or exception
+ *
+ * @param t the <code>java.lang.Throwable</code> error
+ * or exception
+ *
+ *
+ */
+
+ public void log(String message, Throwable t) {
+ getServletContext().log(getServletName() + ": " + message, t);
+ }
+
+
+
+ /**
+ * Called by the servlet container to allow the servlet to respond to
+ * a request. See {@link Servlet#service}.
+ *
+ * <p>This method is declared abstract so subclasses, such as
+ * <code>HttpServlet</code>, must override it.
+ *
+ *
+ *
+ * @param req the <code>ServletRequest</code> object
+ * that contains the client's request
+ *
+ * @param res the <code>ServletResponse</code> object
+ * that will contain the servlet's response
+ *
+ * @exception ServletException if an exception occurs that
+ * interferes with the servlet's
+ * normal operation occurred
+ *
+ * @exception IOException if an input or output
+ * exception occurs
+ *
+ */
+
+ public abstract void service(ServletRequest req, ServletResponse res)
+ throws ServletException, IOException;
+
+
+
+ /**
+ * Returns the name of this servlet instance.
+ * See {@link ServletConfig#getServletName}.
+ *
+ * @return the name of this servlet instance
+ *
+ *
+ *
+ */
+
+ public String getServletName() {
+ return config.getServletName();
+ }
+}
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/GenericServlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/GenericServlet.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/GenericServlet.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings.properties
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings.properties?rev=437256&r1=437255&r2=437256&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings.properties (original)
+++ geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings.properties Sat Aug 26 17:17:49 2006
@@ -1,20 +1,20 @@
-# Copyright 2004 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.
-
-# Default localized string information
-# Localized for Locale en_US
-
-err.not_iso8859_1=Not an ISO 8859-1 character: {0}
-value.true=true
-value.false=false
+# Copyright 2004 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.
+
+# Default localized string information
+# Localized for Locale en_US
+
+err.not_iso8859_1=Not an ISO 8859-1 character: {0}
+value.true=true
+value.false=false
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings_fr.properties
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings_fr.properties?rev=437256&r1=437255&r2=437256&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings_fr.properties (original)
+++ geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings_fr.properties Sat Aug 26 17:17:49 2006
@@ -1,22 +1,22 @@
-# Copyright 2004 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.
-
-# Default localized string information
-# Localized for Locale fr_FR
-
-err.not_iso8859_1={0} n''est pas un caractère ISO 8859-1
-value.true=true
-value.false=false
-
-
+# Copyright 2004 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.
+
+# Default localized string information
+# Localized for Locale fr_FR
+
+err.not_iso8859_1={0} n''est pas un caractère ISO 8859-1
+value.true=true
+value.false=false
+
+
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings_fr.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings_fr.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings_fr.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings_ja.properties
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings_ja.properties?rev=437256&r1=437255&r2=437256&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings_ja.properties (original)
+++ geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings_ja.properties Sat Aug 26 17:17:49 2006
@@ -1,20 +1,20 @@
-# Copyright 2004 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.
-
-# Default localized string information
-# Localized for Locale ja_JP
-
-err.not_iso8859_1=ISO 8859-1 \u306e\u6587\u5b57\u3067\u306f\u3042\u308a\u307e\u305b\u3093: {0}
-value.true=true
-value.false=false
+# Copyright 2004 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.
+
+# Default localized string information
+# Localized for Locale ja_JP
+
+err.not_iso8859_1=ISO 8859-1 \u306e\u6587\u5b57\u3067\u306f\u3042\u308a\u307e\u305b\u3093: {0}
+value.true=true
+value.false=false
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings_ja.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings_ja.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/LocalStrings_ja.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/RequestDispatcher.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/RequestDispatcher.java?rev=437256&r1=437255&r2=437256&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/RequestDispatcher.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/RequestDispatcher.java Sat Aug 26 17:17:49 2006
@@ -1,138 +1,138 @@
-/*
-* Copyright 2004 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.
-*/
-
-package javax.servlet;
-
-import java.io.IOException;
-
-
-/**
- * Defines an object that receives requests from the client
- * and sends them to any resource (such as a servlet,
- * HTML file, or JSP file) on the server. The servlet
- * container creates the <code>RequestDispatcher</code> object,
- * which is used as a wrapper around a server resource located
- * at a particular path or given by a particular name.
- *
- * <p>This interface is intended to wrap servlets,
- * but a servlet container can create <code>RequestDispatcher</code>
- * objects to wrap any type of resource.
- *
- * @author Various
- * @version $Version$
- *
- * @see ServletContext#getRequestDispatcher(java.lang.String)
- * @see ServletContext#getNamedDispatcher(java.lang.String)
- * @see ServletRequest#getRequestDispatcher(java.lang.String)
- *
- */
-
-public interface RequestDispatcher {
-
-
-
-
-
-/**
- * Forwards a request from
- * a servlet to another resource (servlet, JSP file, or
- * HTML file) on the server. This method allows
- * one servlet to do preliminary processing of
- * a request and another resource to generate
- * the response.
- *
- * <p>For a <code>RequestDispatcher</code> obtained via
- * <code>getRequestDispatcher()</code>, the <code>ServletRequest</code>
- * object has its path elements and parameters adjusted to match
- * the path of the target resource.
- *
- * <p><code>forward</code> should be called before the response has been
- * committed to the client (before response body output has been flushed).
- * If the response already has been committed, this method throws
- * an <code>IllegalStateException</code>.
- * Uncommitted output in the response buffer is automatically cleared
- * before the forward.
- *
- * <p>The request and response parameters must be either the same
- * objects as were passed to the calling servlet's service method or be
- * subclasses of the {@link ServletRequestWrapper} or {@link ServletResponseWrapper} classes
- * that wrap them.
- *
- *
- * @param request a {@link ServletRequest} object
- * that represents the request the client
- * makes of the servlet
- *
- * @param response a {@link ServletResponse} object
- * that represents the response the servlet
- * returns to the client
- *
- * @exception ServletException if the target resource throws this exception
- *
- * @exception IOException if the target resource throws this exception
- *
- * @exception IllegalStateException if the response was already committed
- *
- */
-
- public void forward(ServletRequest request, ServletResponse response)
- throws ServletException, IOException;
-
-
-
-
- /**
- *
- * Includes the content of a resource (servlet, JSP page,
- * HTML file) in the response. In essence, this method enables
- * programmatic server-side includes.
- *
- * <p>The {@link ServletResponse} object has its path elements
- * and parameters remain unchanged from the caller's. The included
- * servlet cannot change the response status code or set headers;
- * any attempt to make a change is ignored.
- *
- * <p>The request and response parameters must be either the same
- * objects as were passed to the calling servlet's service method or be
- * subclasses of the {@link ServletRequestWrapper} or {@link ServletResponseWrapper} classes
- * that wrap them.
- *
- *
- *
- * @param request a {@link ServletRequest} object
- * that contains the client's request
- *
- * @param response a {@link ServletResponse} object
- * that contains the servlet's response
- *
- * @exception ServletException if the included resource throws this exception
- *
- * @exception IOException if the included resource throws this exception
- *
- *
- */
-
- public void include(ServletRequest request, ServletResponse response)
- throws ServletException, IOException;
-}
-
-
-
-
-
-
-
-
+/*
+* Copyright 2004 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.
+*/
+
+package javax.servlet;
+
+import java.io.IOException;
+
+
+/**
+ * Defines an object that receives requests from the client
+ * and sends them to any resource (such as a servlet,
+ * HTML file, or JSP file) on the server. The servlet
+ * container creates the <code>RequestDispatcher</code> object,
+ * which is used as a wrapper around a server resource located
+ * at a particular path or given by a particular name.
+ *
+ * <p>This interface is intended to wrap servlets,
+ * but a servlet container can create <code>RequestDispatcher</code>
+ * objects to wrap any type of resource.
+ *
+ * @author Various
+ * @version $Version$
+ *
+ * @see ServletContext#getRequestDispatcher(java.lang.String)
+ * @see ServletContext#getNamedDispatcher(java.lang.String)
+ * @see ServletRequest#getRequestDispatcher(java.lang.String)
+ *
+ */
+
+public interface RequestDispatcher {
+
+
+
+
+
+/**
+ * Forwards a request from
+ * a servlet to another resource (servlet, JSP file, or
+ * HTML file) on the server. This method allows
+ * one servlet to do preliminary processing of
+ * a request and another resource to generate
+ * the response.
+ *
+ * <p>For a <code>RequestDispatcher</code> obtained via
+ * <code>getRequestDispatcher()</code>, the <code>ServletRequest</code>
+ * object has its path elements and parameters adjusted to match
+ * the path of the target resource.
+ *
+ * <p><code>forward</code> should be called before the response has been
+ * committed to the client (before response body output has been flushed).
+ * If the response already has been committed, this method throws
+ * an <code>IllegalStateException</code>.
+ * Uncommitted output in the response buffer is automatically cleared
+ * before the forward.
+ *
+ * <p>The request and response parameters must be either the same
+ * objects as were passed to the calling servlet's service method or be
+ * subclasses of the {@link ServletRequestWrapper} or {@link ServletResponseWrapper} classes
+ * that wrap them.
+ *
+ *
+ * @param request a {@link ServletRequest} object
+ * that represents the request the client
+ * makes of the servlet
+ *
+ * @param response a {@link ServletResponse} object
+ * that represents the response the servlet
+ * returns to the client
+ *
+ * @exception ServletException if the target resource throws this exception
+ *
+ * @exception IOException if the target resource throws this exception
+ *
+ * @exception IllegalStateException if the response was already committed
+ *
+ */
+
+ public void forward(ServletRequest request, ServletResponse response)
+ throws ServletException, IOException;
+
+
+
+
+ /**
+ *
+ * Includes the content of a resource (servlet, JSP page,
+ * HTML file) in the response. In essence, this method enables
+ * programmatic server-side includes.
+ *
+ * <p>The {@link ServletResponse} object has its path elements
+ * and parameters remain unchanged from the caller's. The included
+ * servlet cannot change the response status code or set headers;
+ * any attempt to make a change is ignored.
+ *
+ * <p>The request and response parameters must be either the same
+ * objects as were passed to the calling servlet's service method or be
+ * subclasses of the {@link ServletRequestWrapper} or {@link ServletResponseWrapper} classes
+ * that wrap them.
+ *
+ *
+ *
+ * @param request a {@link ServletRequest} object
+ * that contains the client's request
+ *
+ * @param response a {@link ServletResponse} object
+ * that contains the servlet's response
+ *
+ * @exception ServletException if the included resource throws this exception
+ *
+ * @exception IOException if the included resource throws this exception
+ *
+ *
+ */
+
+ public void include(ServletRequest request, ServletResponse response)
+ throws ServletException, IOException;
+}
+
+
+
+
+
+
+
+
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/RequestDispatcher.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/RequestDispatcher.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/RequestDispatcher.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/Servlet.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/Servlet.java?rev=437256&r1=437255&r2=437256&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/Servlet.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/Servlet.java Sat Aug 26 17:17:49 2006
@@ -1,192 +1,192 @@
-/*
-* Copyright 2004 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.
-*/
-
-package javax.servlet;
-
-import java.io.IOException;
-
-
-/**
- * Defines methods that all servlets must implement.
- *
- * <p>A servlet is a small Java program that runs within a Web server.
- * Servlets receive and respond to requests from Web clients,
- * usually across HTTP, the HyperText Transfer Protocol.
- *
- * <p>To implement this interface, you can write a generic servlet
- * that extends
- * <code>javax.servlet.GenericServlet</code> or an HTTP servlet that
- * extends <code>javax.servlet.http.HttpServlet</code>.
- *
- * <p>This interface defines methods to initialize a servlet,
- * to service requests, and to remove a servlet from the server.
- * These are known as life-cycle methods and are called in the
- * following sequence:
- * <ol>
- * <li>The servlet is constructed, then initialized with the <code>init</code> method.
- * <li>Any calls from clients to the <code>service</code> method are handled.
- * <li>The servlet is taken out of service, then destroyed with the
- * <code>destroy</code> method, then garbage collected and finalized.
- * </ol>
- *
- * <p>In addition to the life-cycle methods, this interface
- * provides the <code>getServletConfig</code> method, which the servlet
- * can use to get any startup information, and the <code>getServletInfo</code>
- * method, which allows the servlet to return basic information about itself,
- * such as author, version, and copyright.
- *
- * @author Various
- * @version $Version$
- *
- * @see GenericServlet
- * @see javax.servlet.http.HttpServlet
- *
- */
-
-
-public interface Servlet {
-
- /**
- * Called by the servlet container to indicate to a servlet that the
- * servlet is being placed into service.
- *
- * <p>The servlet container calls the <code>init</code>
- * method exactly once after instantiating the servlet.
- * The <code>init</code> method must complete successfully
- * before the servlet can receive any requests.
- *
- * <p>The servlet container cannot place the servlet into service
- * if the <code>init</code> method
- * <ol>
- * <li>Throws a <code>ServletException</code>
- * <li>Does not return within a time period defined by the Web server
- * </ol>
- *
- *
- * @param config a <code>ServletConfig</code> object
- * containing the servlet's
- * configuration and initialization parameters
- *
- * @exception ServletException if an exception has occurred that
- * interferes with the servlet's normal
- * operation
- *
- * @see UnavailableException
- * @see #getServletConfig
- *
- */
-
- public void init(ServletConfig config) throws ServletException;
-
-
-
- /**
- *
- * Returns a {@link ServletConfig} object, which contains
- * initialization and startup parameters for this servlet.
- * The <code>ServletConfig</code> object returned is the one
- * passed to the <code>init</code> method.
- *
- * <p>Implementations of this interface are responsible for storing the
- * <code>ServletConfig</code> object so that this
- * method can return it. The {@link GenericServlet}
- * class, which implements this interface, already does this.
- *
- * @return the <code>ServletConfig</code> object
- * that initializes this servlet
- *
- * @see #init
- *
- */
-
- public ServletConfig getServletConfig();
-
-
-
- /**
- * Called by the servlet container to allow the servlet to respond to
- * a request.
- *
- * <p>This method is only called after the servlet's <code>init()</code>
- * method has completed successfully.
- *
- * <p> The status code of the response always should be set for a servlet
- * that throws or sends an error.
- *
- *
- * <p>Servlets typically run inside multithreaded servlet containers
- * that can handle multiple requests concurrently. Developers must
- * be aware to synchronize access to any shared resources such as files,
- * network connections, and as well as the servlet's class and instance
- * variables.
- * More information on multithreaded programming in Java is available in
- * <a href="http://java.sun.com/Series/Tutorial/java/threads/multithreaded.html">
- * the Java tutorial on multi-threaded programming</a>.
- *
- *
- * @param req the <code>ServletRequest</code> object that contains
- * the client's request
- *
- * @param res the <code>ServletResponse</code> object that contains
- * the servlet's response
- *
- * @exception ServletException if an exception occurs that interferes
- * with the servlet's normal operation
- *
- * @exception IOException if an input or output exception occurs
- *
- */
-
- public void service(ServletRequest req, ServletResponse res)
- throws ServletException, IOException;
-
-
-
- /**
- * Returns information about the servlet, such
- * as author, version, and copyright.
- *
- * <p>The string that this method returns should
- * be plain text and not markup of any kind (such as HTML, XML,
- * etc.).
- *
- * @return a <code>String</code> containing servlet information
- *
- */
-
- public String getServletInfo();
-
-
-
- /**
- *
- * Called by the servlet container to indicate to a servlet that the
- * servlet is being taken out of service. This method is
- * only called once all threads within the servlet's
- * <code>service</code> method have exited or after a timeout
- * period has passed. After the servlet container calls this
- * method, it will not call the <code>service</code> method again
- * on this servlet.
- *
- * <p>This method gives the servlet an opportunity
- * to clean up any resources that are being held (for example, memory,
- * file handles, threads) and make sure that any persistent state is
- * synchronized with the servlet's current state in memory.
- *
- */
-
- public void destroy();
-}
+/*
+* Copyright 2004 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.
+*/
+
+package javax.servlet;
+
+import java.io.IOException;
+
+
+/**
+ * Defines methods that all servlets must implement.
+ *
+ * <p>A servlet is a small Java program that runs within a Web server.
+ * Servlets receive and respond to requests from Web clients,
+ * usually across HTTP, the HyperText Transfer Protocol.
+ *
+ * <p>To implement this interface, you can write a generic servlet
+ * that extends
+ * <code>javax.servlet.GenericServlet</code> or an HTTP servlet that
+ * extends <code>javax.servlet.http.HttpServlet</code>.
+ *
+ * <p>This interface defines methods to initialize a servlet,
+ * to service requests, and to remove a servlet from the server.
+ * These are known as life-cycle methods and are called in the
+ * following sequence:
+ * <ol>
+ * <li>The servlet is constructed, then initialized with the <code>init</code> method.
+ * <li>Any calls from clients to the <code>service</code> method are handled.
+ * <li>The servlet is taken out of service, then destroyed with the
+ * <code>destroy</code> method, then garbage collected and finalized.
+ * </ol>
+ *
+ * <p>In addition to the life-cycle methods, this interface
+ * provides the <code>getServletConfig</code> method, which the servlet
+ * can use to get any startup information, and the <code>getServletInfo</code>
+ * method, which allows the servlet to return basic information about itself,
+ * such as author, version, and copyright.
+ *
+ * @author Various
+ * @version $Version$
+ *
+ * @see GenericServlet
+ * @see javax.servlet.http.HttpServlet
+ *
+ */
+
+
+public interface Servlet {
+
+ /**
+ * Called by the servlet container to indicate to a servlet that the
+ * servlet is being placed into service.
+ *
+ * <p>The servlet container calls the <code>init</code>
+ * method exactly once after instantiating the servlet.
+ * The <code>init</code> method must complete successfully
+ * before the servlet can receive any requests.
+ *
+ * <p>The servlet container cannot place the servlet into service
+ * if the <code>init</code> method
+ * <ol>
+ * <li>Throws a <code>ServletException</code>
+ * <li>Does not return within a time period defined by the Web server
+ * </ol>
+ *
+ *
+ * @param config a <code>ServletConfig</code> object
+ * containing the servlet's
+ * configuration and initialization parameters
+ *
+ * @exception ServletException if an exception has occurred that
+ * interferes with the servlet's normal
+ * operation
+ *
+ * @see UnavailableException
+ * @see #getServletConfig
+ *
+ */
+
+ public void init(ServletConfig config) throws ServletException;
+
+
+
+ /**
+ *
+ * Returns a {@link ServletConfig} object, which contains
+ * initialization and startup parameters for this servlet.
+ * The <code>ServletConfig</code> object returned is the one
+ * passed to the <code>init</code> method.
+ *
+ * <p>Implementations of this interface are responsible for storing the
+ * <code>ServletConfig</code> object so that this
+ * method can return it. The {@link GenericServlet}
+ * class, which implements this interface, already does this.
+ *
+ * @return the <code>ServletConfig</code> object
+ * that initializes this servlet
+ *
+ * @see #init
+ *
+ */
+
+ public ServletConfig getServletConfig();
+
+
+
+ /**
+ * Called by the servlet container to allow the servlet to respond to
+ * a request.
+ *
+ * <p>This method is only called after the servlet's <code>init()</code>
+ * method has completed successfully.
+ *
+ * <p> The status code of the response always should be set for a servlet
+ * that throws or sends an error.
+ *
+ *
+ * <p>Servlets typically run inside multithreaded servlet containers
+ * that can handle multiple requests concurrently. Developers must
+ * be aware to synchronize access to any shared resources such as files,
+ * network connections, and as well as the servlet's class and instance
+ * variables.
+ * More information on multithreaded programming in Java is available in
+ * <a href="http://java.sun.com/Series/Tutorial/java/threads/multithreaded.html">
+ * the Java tutorial on multi-threaded programming</a>.
+ *
+ *
+ * @param req the <code>ServletRequest</code> object that contains
+ * the client's request
+ *
+ * @param res the <code>ServletResponse</code> object that contains
+ * the servlet's response
+ *
+ * @exception ServletException if an exception occurs that interferes
+ * with the servlet's normal operation
+ *
+ * @exception IOException if an input or output exception occurs
+ *
+ */
+
+ public void service(ServletRequest req, ServletResponse res)
+ throws ServletException, IOException;
+
+
+
+ /**
+ * Returns information about the servlet, such
+ * as author, version, and copyright.
+ *
+ * <p>The string that this method returns should
+ * be plain text and not markup of any kind (such as HTML, XML,
+ * etc.).
+ *
+ * @return a <code>String</code> containing servlet information
+ *
+ */
+
+ public String getServletInfo();
+
+
+
+ /**
+ *
+ * Called by the servlet container to indicate to a servlet that the
+ * servlet is being taken out of service. This method is
+ * only called once all threads within the servlet's
+ * <code>service</code> method have exited or after a timeout
+ * period has passed. After the servlet container calls this
+ * method, it will not call the <code>service</code> method again
+ * on this servlet.
+ *
+ * <p>This method gives the servlet an opportunity
+ * to clean up any resources that are being held (for example, memory,
+ * file handles, threads) and make sure that any persistent state is
+ * synchronized with the servlet's current state in memory.
+ *
+ */
+
+ public void destroy();
+}
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/Servlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/Servlet.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/Servlet.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/ServletConfig.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/ServletConfig.java?rev=437256&r1=437255&r2=437256&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/ServletConfig.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/ServletConfig.java Sat Aug 26 17:17:49 2006
@@ -1,94 +1,94 @@
-/*
-* Copyright 2004 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.
-*/
-package javax.servlet;
-
-import java.util.Enumeration;
-
-
-
-/**
- *
- * A servlet configuration object used by a servlet container
- * to pass information to a servlet during initialization.
- *
- */
-
-public interface ServletConfig {
-
-
- /**
- * Returns the name of this servlet instance.
- * The name may be provided via server administration, assigned in the
- * web application deployment descriptor, or for an unregistered (and thus
- * unnamed) servlet instance it will be the servlet's class name.
- *
- * @return the name of the servlet instance
- *
- *
- *
- */
-
- public String getServletName();
-
- /**
- * Returns a reference to the {@link ServletContext} in which the caller
- * is executing.
- *
- *
- * @return a {@link ServletContext} object, used
- * by the caller to interact with its servlet
- * container
- *
- * @see ServletContext
- *
- */
-
- public ServletContext getServletContext();
-
- /**
- * Returns a <code>String</code> containing the value of the
- * named initialization parameter, or <code>null</code> if
- * the parameter does not exist.
- *
- * @param name a <code>String</code> specifying the name
- * of the initialization parameter
- *
- * @return a <code>String</code> containing the value
- * of the initialization parameter
- *
- */
-
- public String getInitParameter(String name);
-
-
- /**
- * Returns the names of the servlet's initialization parameters
- * as an <code>Enumeration</code> of <code>String</code> objects,
- * or an empty <code>Enumeration</code> if the servlet has
- * no initialization parameters.
- *
- * @return an <code>Enumeration</code> of <code>String</code>
- * objects containing the names of the servlet's
- * initialization parameters
- *
- *
- *
- */
-
- public Enumeration getInitParameterNames();
-
-
-}
+/*
+* Copyright 2004 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.
+*/
+package javax.servlet;
+
+import java.util.Enumeration;
+
+
+
+/**
+ *
+ * A servlet configuration object used by a servlet container
+ * to pass information to a servlet during initialization.
+ *
+ */
+
+public interface ServletConfig {
+
+
+ /**
+ * Returns the name of this servlet instance.
+ * The name may be provided via server administration, assigned in the
+ * web application deployment descriptor, or for an unregistered (and thus
+ * unnamed) servlet instance it will be the servlet's class name.
+ *
+ * @return the name of the servlet instance
+ *
+ *
+ *
+ */
+
+ public String getServletName();
+
+ /**
+ * Returns a reference to the {@link ServletContext} in which the caller
+ * is executing.
+ *
+ *
+ * @return a {@link ServletContext} object, used
+ * by the caller to interact with its servlet
+ * container
+ *
+ * @see ServletContext
+ *
+ */
+
+ public ServletContext getServletContext();
+
+ /**
+ * Returns a <code>String</code> containing the value of the
+ * named initialization parameter, or <code>null</code> if
+ * the parameter does not exist.
+ *
+ * @param name a <code>String</code> specifying the name
+ * of the initialization parameter
+ *
+ * @return a <code>String</code> containing the value
+ * of the initialization parameter
+ *
+ */
+
+ public String getInitParameter(String name);
+
+
+ /**
+ * Returns the names of the servlet's initialization parameters
+ * as an <code>Enumeration</code> of <code>String</code> objects,
+ * or an empty <code>Enumeration</code> if the servlet has
+ * no initialization parameters.
+ *
+ * @return an <code>Enumeration</code> of <code>String</code>
+ * objects containing the names of the servlet's
+ * initialization parameters
+ *
+ *
+ *
+ */
+
+ public Enumeration getInitParameterNames();
+
+
+}
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/ServletConfig.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/ServletConfig.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/specs/trunk/geronimo-servlet_2.5_spec/src/main/java/javax/servlet/ServletConfig.java
------------------------------------------------------------------------------
svn:mime-type = text/plain