JBossWeb SVN: r905 - in trunk/java/javax/servlet: annotation and 2 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-01-16 11:10:23 -0500 (Fri, 16 Jan 2009)
New Revision: 905
Added:
trunk/java/javax/servlet/AsyncContext.java
trunk/java/javax/servlet/AsyncEvent.java
trunk/java/javax/servlet/AsyncListener.java
trunk/java/javax/servlet/DispatcherType.java
trunk/java/javax/servlet/SessionCookieConfig.java
trunk/java/javax/servlet/SessionTrackingMode.java
trunk/java/javax/servlet/annotation/
trunk/java/javax/servlet/annotation/InitParam.java
trunk/java/javax/servlet/annotation/ServletFilter.java
trunk/java/javax/servlet/annotation/WebServlet.java
trunk/java/javax/servlet/annotation/WebServletContextListener.java
Modified:
trunk/java/javax/servlet/FilterConfig.java
trunk/java/javax/servlet/GenericServlet.java
trunk/java/javax/servlet/LocalStrings_es.properties
trunk/java/javax/servlet/ServletConfig.java
trunk/java/javax/servlet/ServletContext.java
trunk/java/javax/servlet/ServletRequest.java
trunk/java/javax/servlet/ServletRequestWrapper.java
trunk/java/javax/servlet/http/Cookie.java
trunk/java/javax/servlet/http/HttpServlet.java
trunk/java/javax/servlet/http/HttpServletRequest.java
trunk/java/javax/servlet/http/HttpServletRequestWrapper.java
trunk/java/javax/servlet/http/HttpServletResponseWrapper.java
trunk/java/javax/servlet/http/HttpSession.java
trunk/java/javax/servlet/http/HttpSessionContext.java
trunk/java/javax/servlet/http/HttpUtils.java
trunk/java/javax/servlet/http/package.html
trunk/java/javax/servlet/package.html
trunk/java/javax/servlet/resources/XMLSchema.dtd
trunk/java/javax/servlet/resources/datatypes.dtd
trunk/java/javax/servlet/resources/web-app_2_3.dtd
trunk/java/javax/servlet/resources/web-app_2_4.xsd
trunk/java/javax/servlet/resources/web-app_2_5.xsd
Log:
- Sync with the ASF API classes.
- Will not build for now, as I don't feel like adding dummy methods which I will forget about.
Added: trunk/java/javax/servlet/AsyncContext.java
===================================================================
--- trunk/java/javax/servlet/AsyncContext.java (rev 0)
+++ trunk/java/javax/servlet/AsyncContext.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -0,0 +1,33 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You 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;
+
+/**
+ * @since 3.0
+ * $Id: AsyncContext.java 731967 2009-01-06 15:15:32Z markt $
+ * TODO SERVLET3
+ */
+public interface AsyncContext {
+ ServletRequest getRequest();
+ ServletResponse getResponse();
+ boolean hasOriginalRequestAndResponse();
+ void forward();
+ void forward(String path);
+ void forward(ServletContext context, String path);
+ void complete();
+ void start(Runnable run);
+}
Added: trunk/java/javax/servlet/AsyncEvent.java
===================================================================
--- trunk/java/javax/servlet/AsyncEvent.java (rev 0)
+++ trunk/java/javax/servlet/AsyncEvent.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -0,0 +1,40 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You 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;
+
+/**
+ * @since 3.0
+ * $Id: AsyncEvent.java 731967 2009-01-06 15:15:32Z markt $
+ * TODO SERVLET3
+ */
+public class AsyncEvent {
+ private ServletRequest request;
+ private ServletResponse response;
+
+ AsyncEvent(ServletRequest request, ServletResponse response) {
+ this.request = request;
+ this.response = response;
+ }
+
+ public ServletRequest getRequest() {
+ return request;
+ }
+
+ public ServletResponse getResponse() {
+ return response;
+ }
+}
Added: trunk/java/javax/servlet/AsyncListener.java
===================================================================
--- trunk/java/javax/servlet/AsyncListener.java (rev 0)
+++ trunk/java/javax/servlet/AsyncListener.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -0,0 +1,29 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You 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;
+
+/**
+ * @since 3.0
+ * $Id: AsyncListener.java 731967 2009-01-06 15:15:32Z markt $
+ * TODO SERVLET3
+ */
+public interface AsyncListener {
+ void onComplete(AsyncEvent event) throws IOException;
+ void onTimeout(AsyncEvent event) throws IOException;
+}
Added: trunk/java/javax/servlet/DispatcherType.java
===================================================================
--- trunk/java/javax/servlet/DispatcherType.java (rev 0)
+++ trunk/java/javax/servlet/DispatcherType.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -0,0 +1,28 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You 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;
+
+/**
+ * @since 3.0
+ * $Id: DispatcherType.java 734696 2009-01-15 13:24:26Z markt $
+ */
+public enum DispatcherType {
+ FORWARD,
+ INCLUDE,
+ REQUEST,
+ ERROR
+}
Modified: trunk/java/javax/servlet/FilterConfig.java
===================================================================
--- trunk/java/javax/servlet/FilterConfig.java 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/FilterConfig.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -84,7 +84,7 @@
*
*/
- public Enumeration getInitParameterNames();
+ public Enumeration<String> getInitParameterNames();
Modified: trunk/java/javax/servlet/GenericServlet.java
===================================================================
--- trunk/java/javax/servlet/GenericServlet.java 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/GenericServlet.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -119,7 +119,7 @@
*
*/
- public Enumeration getInitParameterNames() {
+ public Enumeration<String> getInitParameterNames() {
return getServletConfig().getInitParameterNames();
}
Modified: trunk/java/javax/servlet/LocalStrings_es.properties
===================================================================
--- trunk/java/javax/servlet/LocalStrings_es.properties 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/LocalStrings_es.properties 2009-01-16 16:10:23 UTC (rev 905)
@@ -1,3 +1,18 @@
-err.not_iso8859_1 = No es un car\u00E1cter ISO 8859-1\: {0}
-value.true = true
-value.false = false
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+err.not_iso8859_1 = No es un car\u00E1cter ISO 8859-1\: {0}
+value.true = true
+value.false = false
Modified: trunk/java/javax/servlet/ServletConfig.java
===================================================================
--- trunk/java/javax/servlet/ServletConfig.java 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/ServletConfig.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -89,7 +89,7 @@
*
*/
- public Enumeration getInitParameterNames();
+ public Enumeration<String> getInitParameterNames();
}
Modified: trunk/java/javax/servlet/ServletContext.java
===================================================================
--- trunk/java/javax/servlet/ServletContext.java 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/ServletContext.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -19,7 +19,9 @@
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.EnumSet;
import java.util.Enumeration;
+import java.util.Map;
import java.util.Set;
@@ -90,10 +92,10 @@
/**
* Returns the major version of the Java Servlet API that this
* servlet container supports. All implementations that comply
- * with Version 2.4 must have this method
- * return the integer 2.
+ * with Version 3.0 must have this method
+ * return the integer 3.
*
- * @return 2
+ * @return 3
*
*/
@@ -104,10 +106,10 @@
/**
* Returns the minor version of the Servlet API that this
* servlet container supports. All implementations that comply
- * with Version 2.4 must have this method
- * return the integer 4.
+ * with Version 3.0 must have this method
+ * return the integer 0.
*
- * @return 4
+ * @return 0
*
*/
@@ -160,7 +162,7 @@
* @since Servlet 2.3
*/
- public Set getResourcePaths(String path);
+ public Set<String> getResourcePaths(String path);
@@ -350,7 +352,7 @@
*
*/
- public Enumeration getServlets();
+ public Enumeration<Servlet> getServlets();
@@ -369,7 +371,7 @@
*
*/
- public Enumeration getServletNames();
+ public Enumeration<String> getServletNames();
@@ -522,7 +524,7 @@
* @see ServletConfig#getInitParameter
*/
- public Enumeration getInitParameterNames();
+ public Enumeration<String> getInitParameterNames();
@@ -575,7 +577,7 @@
*
*/
- public Enumeration getAttributeNames();
+ public Enumeration<String> getAttributeNames();
@@ -641,6 +643,87 @@
*/
public String getServletContextName();
+
+ /**
+ *
+ * @param servletName
+ * @param urlPatterns
+ * @since 3.0
+ */
+ public void addServletMapping(String servletName, String[] urlPatterns);
+
+ /**
+ *
+ * @param filterName
+ * @param description
+ * @param className
+ * @param initParameters
+ * @param isAsyncSupported
+ * @since 3.0
+ */
+ public void addFilter(String filterName, String description,
+ String className, Map<String,String> initParameters,
+ boolean isAsyncSupported);
+
+ /**
+ *
+ * @param filterName
+ * @param dispatcherTypes
+ * @param isMatchAfter
+ * @param servletNames
+ * @since 3.0
+ */
+ public void addFilterMappingForServletNames(String filterName,
+ EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter,
+ String... servletNames);
+
+ /**
+ *
+ * @param filterName
+ * @param dispatcherTypes
+ * @param isMatchAfter
+ * @param urlPatterns
+ * @since 3.0
+ */
+ public void addFilterMappingForUrlPatterns(String filterName,
+ EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter,
+ String... urlPatterns);
+
+ /**
+ *
+ * @param sessionCookieConfig
+ * @since 3.0
+ */
+ public void setSessionCookieConfig(SessionCookieConfig sessionCookieConfig);
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public SessionCookieConfig getSessionCookieConfig();
+
+ /**
+ *
+ * @param sessionTrackingModes
+ * @since 3.0
+ */
+ public void setSessionTrackingModes(
+ EnumSet<SessionTrackingMode> sessionTrackingModes);
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public EnumSet<SessionTrackingMode> getDefaultSessionTrackingModes();
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public EnumSet<SessionTrackingMode> getEffectiveSessionTrackingModes();
}
Modified: trunk/java/javax/servlet/ServletRequest.java
===================================================================
--- trunk/java/javax/servlet/ServletRequest.java 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/ServletRequest.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -91,7 +91,7 @@
*
*/
- public Enumeration getAttributeNames();
+ public Enumeration<String> getAttributeNames();
@@ -229,7 +229,7 @@
*
*/
- public Enumeration getParameterNames();
+ public Enumeration<String> getParameterNames();
@@ -266,7 +266,7 @@
*
*/
- public Map getParameterMap();
+ public Map<String,String[]> getParameterMap();
@@ -480,7 +480,7 @@
*
*/
- public Enumeration getLocales();
+ public Enumeration<Locale> getLocales();
@@ -594,5 +594,76 @@
*/
public int getLocalPort();
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public ServletContext getServletContext();
+
+ /**
+ *
+ * @return
+ * @throws java.lang.IllegalStateException
+ * @since 3.0
+ */
+ public AsyncContext startAsync() throws java.lang.IllegalStateException;
+
+ /**
+ *
+ * @param servletRequest
+ * @param servletResponse
+ * @return
+ * @throws java.lang.IllegalStateException
+ * @since 3.0
+ */
+ public AsyncContext startAsync(ServletRequest servletRequest,
+ ServletResponse servletResponse)
+ throws java.lang.IllegalStateException;
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public boolean isAsyncStarted();
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public boolean isAsyncSupported();
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public AsyncContext getAsyncContext();
+
+ /**
+ *
+ * @param listener
+ * @since 3.0
+ */
+ public void addAsyncListener(AsyncListener listener);
+
+ /**
+ *
+ * @param listener
+ * @param servletRequest
+ * @param servletResponse
+ * @since 3.0
+ */
+ public void addAsyncListener(AsyncListener listener,
+ ServletRequest servletRequest, ServletResponse servletResponse);
+
+ /**
+ *
+ * @param timeout
+ * @since 3.0
+ */
+ public void setAsyncTimeout(long timeout);
}
Modified: trunk/java/javax/servlet/ServletRequestWrapper.java
===================================================================
--- trunk/java/javax/servlet/ServletRequestWrapper.java 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/ServletRequestWrapper.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -89,7 +89,7 @@
* on the wrapped request object.
*/
- public Enumeration getAttributeNames() {
+ public Enumeration<String> getAttributeNames() {
return this.request.getAttributeNames();
}
@@ -162,7 +162,7 @@
* The default behavior of this method is to return getParameterMap()
* on the wrapped request object.
*/
- public Map getParameterMap() {
+ public Map<String,String[]> getParameterMap() {
return this.request.getParameterMap();
}
@@ -174,7 +174,7 @@
* on the wrapped request object.
*/
- public Enumeration getParameterNames() {
+ public Enumeration<String> getParameterNames() {
return this.request.getParameterNames();
}
@@ -315,7 +315,7 @@
* on the wrapped request object.
*/
- public Enumeration getLocales() {
+ public Enumeration<Locale> getLocales() {
return this.request.getLocales();
}
@@ -349,6 +349,7 @@
/**
* The default behavior of this method is to return getRealPath(String path)
* on the wrapped request object.
+ * @deprecated As of Version 3.0 of the Java Servlet API
*/
public String getRealPath(String path) {
@@ -396,6 +397,116 @@
public int getLocalPort(){
return this.request.getLocalPort();
}
+
+ /**
+ * The default behavior of this method is to return
+ * getServletContext() on the wrapped request object.
+ *
+ * @return
+ * @since 3.0
+ */
+ public ServletContext getServletContext() {
+ return request.getServletContext();
+ }
+ /**
+ * The default behavior of this method is to return
+ * startAsync() on the wrapped request object.
+ *
+ * @return
+ * @throws java.lang.IllegalStateException
+ * @since 3.0
+ */
+ public AsyncContext startAsync() throws java.lang.IllegalStateException {
+ return request.startAsync();
+ }
+
+ /**
+ * The default behavior of this method is to return
+ * startAsync(ServletRequest, ServletResponse) on the wrapped request
+ * object.
+ *
+ * @param servletRequest
+ * @param servletResponse
+ * @return
+ * @throws java.lang.IllegalStateException
+ * @since 3.0
+ */
+ public AsyncContext startAsync(ServletRequest servletRequest,
+ ServletResponse servletResponse)
+ throws java.lang.IllegalStateException {
+ return request.startAsync(servletRequest, servletResponse);
+ }
+
+ /**
+ * The default behavior of this method is to return
+ * isAsyncStarted() on the wrapped request object.
+ *
+ * @return
+ * @since 3.0
+ */
+ public boolean isAsyncStarted() {
+ return request.isAsyncStarted();
+ }
+
+ /**
+ * The default behavior of this method is to return
+ * isAsyncSupported() on the wrapped request object.
+ *
+ * @return
+ * @since 3.0
+ */
+ public boolean isAsyncSupported() {
+ return request.isAsyncSupported();
+ }
+
+ /**
+ * The default behavior of this method is to return
+ * getAsyncContext() on the wrapped request object.
+ *
+ * @return
+ * @since 3.0
+ */
+ public AsyncContext getAsyncContext() {
+ return request.getAsyncContext();
+ }
+
+ /**
+ * The default behavior of this method is to call
+ * addAsyncListener(AsyncListener) on the wrapped request object.
+ *
+ * @param listener
+ * @since 3.0
+ */
+ public void addAsyncListener(AsyncListener listener) {
+ request.addAsyncListener(listener);
+ }
+
+ /**
+ * The default behavior of this method is to call
+ * addAsyncListener(AsyncListener, ServletRequest, ServletResponse) on the
+ * wrapped request object.
+ *
+ * @param listener
+ * @param servletRequest
+ * @param servletResponse
+ * @since 3.0
+ */
+ public void addAsyncListener(AsyncListener listener,
+ ServletRequest servletRequest, ServletResponse servletResponse) {
+ addAsyncListener(listener, servletRequest, servletResponse);
+ }
+
+ /**
+ * The default behavior of this method is to call
+ * startAsync() on the wrapped request object.
+ *
+ * @param timeout
+ * @since 3.0
+ */
+ public void setAsyncTimeout(long timeout) {
+ request.setAsyncTimeout(timeout);
+ }
+
}
Added: trunk/java/javax/servlet/SessionCookieConfig.java
===================================================================
--- trunk/java/javax/servlet/SessionCookieConfig.java (rev 0)
+++ trunk/java/javax/servlet/SessionCookieConfig.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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;
+
+/**
+ *
+ * @since 3.0
+ * $Id: SessionCookieConfig.java 733271 2009-01-10 13:37:33Z markt $
+ */
+public class SessionCookieConfig {
+ private String domain;
+ private String path;
+ private String comment;
+ private boolean httpOnly;
+ private boolean secure;
+
+ /**
+ *
+ * @param domain Domain to use for session cookies generated for a
+ * {@link ServletContext} in which this
+ * {@link SessionCookieConfig} has been set
+ * @param path Path to use for session cookies generated for a
+ * {@link ServletContext} in which this
+ * {@link SessionCookieConfig} has been set. If null
+ * {@link ServletContext#getContextPath()} is used
+ * @param comment Comment to use for session cookies generated for a
+ * {@link ServletContext} in which this
+ * {@link SessionCookieConfig} has been set
+ * @param isHttpOnly HttpOnly flag to use for session cookies generated for
+ * a {@link ServletContext} in which this
+ * {@link SessionCookieConfig} has been set
+ * @param isSecure If <code>true</code>, the cookie will always be marked
+ * as secure. If <code>false</code> the cookie will only
+ * be marked as secure if the request is secure.
+ */
+ public SessionCookieConfig(String domain, String path, String comment,
+ boolean isHttpOnly, boolean isSecure) {
+ this.domain = domain;
+ this.path = path;
+ this.comment = comment;
+ this.httpOnly = isHttpOnly;
+ this.secure = isSecure;
+ }
+
+ public java.lang.String getDomain() {
+ return domain;
+ }
+
+ public java.lang.String getPath() {
+ return path;
+ }
+
+ public java.lang.String getComment() {
+ return comment;
+ }
+
+ public boolean isHttpOnly() {
+ return httpOnly;
+ }
+
+ public boolean isSecure() {
+ return secure;
+ }
+}
Added: trunk/java/javax/servlet/SessionTrackingMode.java
===================================================================
--- trunk/java/javax/servlet/SessionTrackingMode.java (rev 0)
+++ trunk/java/javax/servlet/SessionTrackingMode.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -0,0 +1,27 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You 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;
+
+/**
+ * @since 3.0
+ * $Id: SessionTrackingMode.java 734696 2009-01-15 13:24:26Z markt $
+ */
+public enum SessionTrackingMode {
+ COOKIE,
+ URL,
+ SSL
+}
Added: trunk/java/javax/servlet/annotation/InitParam.java
===================================================================
--- trunk/java/javax/servlet/annotation/InitParam.java (rev 0)
+++ trunk/java/javax/servlet/annotation/InitParam.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
+
+/**
+ * @since 3.0
+ * $Id: InitParam.java 731967 2009-01-06 15:15:32Z markt $
+ * TODO SERVLET3
+ */
+(a)Target({ElementType.TYPE})
+(a)Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface InitParam {
+ String name();
+ String value();
+ String description() default "";
+}
Added: trunk/java/javax/servlet/annotation/ServletFilter.java
===================================================================
--- trunk/java/javax/servlet/annotation/ServletFilter.java (rev 0)
+++ trunk/java/javax/servlet/annotation/ServletFilter.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
+
+import javax.servlet.DispatcherType;
+
+/**
+ * @since 3.0
+ * $Id: ServletFilter.java 731967 2009-01-06 15:15:32Z markt $
+ * TODO SERVLET3
+ */
+(a)Target({ElementType.TYPE})
+(a)Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface ServletFilter {
+ String description() default "";
+ String displayName() default "";
+ InitParam[] initParams() default {};
+ String filterName() default "";
+ String icon() default "";
+ String[] servletNames() default {};
+ String[] value() default {};
+ String[] urlPatterns() default {};
+ DispatcherType[] dispatcherTypes() default {DispatcherType.REQUEST};
+ boolean asyncSupported() default false;
+ long asyncTimeout() default 60000L;
+}
Added: trunk/java/javax/servlet/annotation/WebServlet.java
===================================================================
--- trunk/java/javax/servlet/annotation/WebServlet.java (rev 0)
+++ trunk/java/javax/servlet/annotation/WebServlet.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
+
+/**
+ * @since 3.0
+ * $Id: WebServlet.java 731967 2009-01-06 15:15:32Z markt $
+ * TODO SERVLET3
+ */
+(a)Target({ElementType.TYPE})
+(a)Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface WebServlet {
+ String name() default "";
+ String[] value() default {};
+ String[] urlPatterns() default {};
+ int loadOnStartup() default -1;
+ InitParam[] initParams() default {};
+ boolean asyncSupported() default false;
+ long asyncTimeout() default 60000L;
+ String icon() default "";
+ String description() default "";
+}
Added: trunk/java/javax/servlet/annotation/WebServletContextListener.java
===================================================================
--- trunk/java/javax/servlet/annotation/WebServletContextListener.java (rev 0)
+++ trunk/java/javax/servlet/annotation/WebServletContextListener.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
+
+/**
+ * @since 3.0
+ * $Id: WebServletContextListener.java 731967 2009-01-06 15:15:32Z markt $
+ * TODO SERVLET3
+ */
+(a)Target({ElementType.TYPE})
+(a)Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface WebServletContextListener {
+ String description() default "";
+}
Modified: trunk/java/javax/servlet/http/Cookie.java
===================================================================
--- trunk/java/javax/servlet/http/Cookie.java 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/http/Cookie.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -81,15 +81,15 @@
// Attributes encoded in the header's cookie fields.
//
- private String comment; // ;Comment=VALUE ... describes cookie's use
- // ;Discard ... implied by maxAge < 0
- private String domain; // ;Domain=VALUE ... domain that sees cookie
- private int maxAge = -1; // ;Max-Age=VALUE ... cookies auto-expire
- private String path; // ;Path=VALUE ... URLs that see the cookie
- private boolean secure; // ;Secure ... e.g. use SSL
- private int version = 0; // ;Version=1 ... means RFC 2109++ style
+ private String comment; // ;Comment=VALUE ... describes cookie's use
+ // ;Discard ... implied by maxAge < 0
+ private String domain; // ;Domain=VALUE ... domain that sees cookie
+ private int maxAge = -1; // ;Max-Age=VALUE ... cookies auto-expire
+ private String path; // ;Path=VALUE ... URLs that see the cookie
+ private boolean secure; // ;Secure ... e.g. use SSL
+ private int version = 0; // ;Version=1 ... means RFC 2109++ style
+ private boolean httpOnly; // Not in cookie specs, but supported by browsers
-
/**
* Constructs a cookie with a specified name and value.
@@ -533,5 +533,23 @@
throw new RuntimeException(e.getMessage());
}
}
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public boolean isHttpOnly() {
+ return httpOnly;
+ }
+
+ /**
+ *
+ * @param httpOnly
+ * since 3.0
+ */
+ public void setHttpOnly(boolean httpOnly) {
+ this.httpOnly = httpOnly;
+ }
}
Modified: trunk/java/javax/servlet/http/HttpServlet.java
===================================================================
--- trunk/java/javax/servlet/http/HttpServlet.java 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/http/HttpServlet.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -416,7 +416,7 @@
}
- private static Method[] getAllDeclaredMethods(Class c) {
+ private static Method[] getAllDeclaredMethods(Class<?> c) {
if (c.equals(javax.servlet.http.HttpServlet.class)) {
return null;
@@ -501,7 +501,7 @@
String allow = null;
if (ALLOW_GET)
- if (allow==null) allow=METHOD_GET;
+ allow=METHOD_GET;
if (ALLOW_HEAD)
if (allow==null) allow=METHOD_HEAD;
else allow += ", " + METHOD_HEAD;
@@ -558,10 +558,10 @@
String responseString = "TRACE "+ req.getRequestURI()+
" " + req.getProtocol();
- Enumeration reqHeaderEnum = req.getHeaderNames();
+ Enumeration<String> reqHeaderEnum = req.getHeaderNames();
while( reqHeaderEnum.hasMoreElements() ) {
- String headerName = (String)reqHeaderEnum.nextElement();
+ String headerName = reqHeaderEnum.nextElement();
responseString += CRLF + headerName + ": " +
req.getHeader(headerName);
}
Modified: trunk/java/javax/servlet/http/HttpServletRequest.java
===================================================================
--- trunk/java/javax/servlet/http/HttpServletRequest.java 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/http/HttpServletRequest.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -192,7 +192,7 @@
*
*/
- public Enumeration getHeaders(String name);
+ public Enumeration<String> getHeaders(String name);
@@ -219,7 +219,7 @@
*
*/
- public Enumeration getHeaderNames();
+ public Enumeration<String> getHeaderNames();
Modified: trunk/java/javax/servlet/http/HttpServletRequestWrapper.java
===================================================================
--- trunk/java/javax/servlet/http/HttpServletRequestWrapper.java 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/http/HttpServletRequestWrapper.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -84,7 +84,7 @@
* The default behavior of this method is to return getHeaders(String name)
* on the wrapped request object.
*/
- public Enumeration getHeaders(String name) {
+ public Enumeration<String> getHeaders(String name) {
return this._getHttpServletRequest().getHeaders(name);
}
@@ -93,7 +93,7 @@
* on the wrapped request object.
*/
- public Enumeration getHeaderNames() {
+ public Enumeration<String> getHeaderNames() {
return this._getHttpServletRequest().getHeaderNames();
}
@@ -253,6 +253,7 @@
/**
* The default behavior of this method is to return isRequestedSessionIdFromUrl()
* on the wrapped request object.
+ * @deprecated As of Version 3.0 of the Java Servlet API
*/
public boolean isRequestedSessionIdFromUrl() {
return this._getHttpServletRequest().isRequestedSessionIdFromUrl();
Modified: trunk/java/javax/servlet/http/HttpServletResponseWrapper.java
===================================================================
--- trunk/java/javax/servlet/http/HttpServletResponseWrapper.java 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/http/HttpServletResponseWrapper.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -87,6 +87,7 @@
/**
* The default behavior of this method is to call encodeUrl(String url)
* on the wrapped response object.
+ * @deprecated As of Version 3.0 of the Java Servlet API
*/
public String encodeUrl(String url) {
return this._getHttpServletResponse().encodeUrl(url);
@@ -95,6 +96,7 @@
/**
* The default behavior of this method is to return encodeRedirectUrl(String url)
* on the wrapped response object.
+ * @deprecated As of Version 3.0 of the Java Servlet API
*/
public String encodeRedirectUrl(String url) {
return this._getHttpServletResponse().encodeRedirectUrl(url);
@@ -187,6 +189,7 @@
/**
* The default behavior of this method is to call setStatus(int sc, String sm)
* on the wrapped response object.
+ * @deprecated As of Version 3.0 of the Java Servlet API
*/
public void setStatus(int sc, String sm) {
this._getHttpServletResponse().setStatus(sc, sm);
Modified: trunk/java/javax/servlet/http/HttpSession.java
===================================================================
--- trunk/java/javax/servlet/http/HttpSession.java 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/http/HttpSession.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -257,7 +257,7 @@
*
*/
- public Enumeration getAttributeNames();
+ public Enumeration<String> getAttributeNames();
Modified: trunk/java/javax/servlet/http/HttpSessionContext.java
===================================================================
--- trunk/java/javax/servlet/http/HttpSessionContext.java 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/http/HttpSessionContext.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -62,7 +62,7 @@
*
*/
- public Enumeration getIds();
+ public Enumeration<String> getIds();
}
Modified: trunk/java/javax/servlet/http/HttpUtils.java
===================================================================
--- trunk/java/javax/servlet/http/HttpUtils.java 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/http/HttpUtils.java 2009-01-16 16:10:23 UTC (rev 905)
@@ -84,18 +84,18 @@
*
*/
- static public Hashtable parseQueryString(String s) {
+ static public Hashtable<String,String[]> parseQueryString(String s) {
String valArray[] = null;
if (s == null) {
throw new IllegalArgumentException();
}
- Hashtable ht = new Hashtable();
+ Hashtable<String,String[]> ht = new Hashtable<String,String[]>();
StringBuffer sb = new StringBuffer();
StringTokenizer st = new StringTokenizer(s, "&");
while (st.hasMoreTokens()) {
- String pair = (String)st.nextToken();
+ String pair = st.nextToken();
int pos = pair.indexOf('=');
if (pos == -1) {
// XXX
@@ -105,7 +105,7 @@
String key = parseName(pair.substring(0, pos), sb);
String val = parseName(pair.substring(pos+1, pair.length()), sb);
if (ht.containsKey(key)) {
- String oldVals[] = (String []) ht.get(key);
+ String oldVals[] = ht.get(key);
valArray = new String[oldVals.length + 1];
for (int i = 0; i < oldVals.length; i++)
valArray[i] = oldVals[i];
@@ -163,15 +163,17 @@
*/
- static public Hashtable parsePostData(int len,
+ static public Hashtable<String,String[]> parsePostData(int len,
ServletInputStream in)
{
// XXX
// should a length of 0 be an IllegalArgumentException
- if (len <=0)
- return new Hashtable(); // cheap hack to return an empty hash
+ // cheap hack to return an empty hash
+ if (len <=0)
+ return new Hashtable<String,String[]>();
+
if (in == null) {
throw new IllegalArgumentException();
}
Modified: trunk/java/javax/servlet/http/package.html
===================================================================
--- trunk/java/javax/servlet/http/package.html 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/http/package.html 2009-01-16 16:10:23 UTC (rev 905)
@@ -2,14 +2,21 @@
<HTML>
<HEAD>
<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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
- Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
+ http://www.apache.org/licenses/LICENSE-2.0
- This software is the proprietary information of Sun Microsystems, Inc.
- Use is subject to license terms.
-
+ 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.
-->
-
</HEAD>
<BODY BGCOLOR="white">
Modified: trunk/java/javax/servlet/package.html
===================================================================
--- trunk/java/javax/servlet/package.html 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/package.html 2009-01-16 16:10:23 UTC (rev 905)
@@ -1,15 +1,22 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
-<HEAD>
<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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
- Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
+ http://www.apache.org/licenses/LICENSE-2.0
- This software is the proprietary information of Sun Microsystems, Inc.
- Use is subject to license terms.
-
+ 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.
-->
-
+<HEAD>
</HEAD>
<BODY BGCOLOR="white">
Modified: trunk/java/javax/servlet/resources/XMLSchema.dtd
===================================================================
--- trunk/java/javax/servlet/resources/XMLSchema.dtd 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/resources/XMLSchema.dtd 2009-01-16 16:10:23 UTC (rev 905)
@@ -1,7 +1,23 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
<!-- DTD for XML Schemas: Part 1: Structures
Public Identifier: "-//W3C//DTD XMLSCHEMA 200102//EN"
Official Location: http://www.w3.org/2001/XMLSchema.dtd -->
-<!-- $Rev: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $ -->
+<!-- $Id: XMLSchema.dtd 615583 2008-01-27 12:01:49Z rjung $ -->
<!-- Note this DTD is NOT normative, or even definitive. --> <!--d-->
<!-- prose copy in the structures REC is the definitive version --> <!--d-->
<!-- (which shouldn't differ from this one except for this --> <!--d-->
Modified: trunk/java/javax/servlet/resources/datatypes.dtd
===================================================================
--- trunk/java/javax/servlet/resources/datatypes.dtd 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/resources/datatypes.dtd 2009-01-16 16:10:23 UTC (rev 905)
@@ -16,7 +16,7 @@
-->
<!--
DTD for XML Schemas: Part 2: Datatypes
- $Id: datatypes.dtd 467222 2006-10-24 03:17:11Z markt $
+ $Id: datatypes.dtd 615583 2008-01-27 12:01:49Z rjung $
Note this DTD is NOT normative, or even definitive. - - the
prose copy in the datatypes REC is the definitive version
(which shouldn't differ from this one except for this comment
Modified: trunk/java/javax/servlet/resources/web-app_2_3.dtd
===================================================================
--- trunk/java/javax/servlet/resources/web-app_2_3.dtd 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/resources/web-app_2_3.dtd 2009-01-16 16:10:23 UTC (rev 905)
@@ -14,79 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<!--
-Copyright 2000-2001 Sun Microsystems, Inc. 901 San Antonio Road,
-Palo Alto, CA 94303, U.S.A. All rights reserved.
-This product or document is protected by copyright and distributed
-under licenses restricting its use, copying, distribution, and
-decompilation. No part of this product or documentation may be
-reproduced in any form by any means without prior written authorization
-of Sun and its licensors, if any.
-
-Third party software, including font technology, is copyrighted and
-licensed from Sun suppliers.
-
-Sun, Sun Microsystems, the Sun Logo, Solaris, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail and Enterprise JavaBeans,
-are trademarks or registered trademarks of Sun Microsystems, Inc in the U.S.
-and other countries.
-
-All SPARC trademarks are used under license and are trademarks
-or registered trademarks of SPARC International, Inc.
-in the U.S. and other countries. Products bearing SPARC
-trademarks are based upon an architecture developed by Sun Microsystems, Inc.
-
-PostScript is a registered trademark of Adobe Systems, Inc.
-
-Federal Acquisitions: Commercial Software - Government Users Subject to
-Standard License Terms and Conditions.
-
-DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED
-CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
-IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT
-TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY
-INVALID.
-
-_________________________________________________________________________
-
-Copyright 2000-2001 Sun Microsystems, Inc.,
-901 San Antonio Road, Palo Alto, CA 94303, Etats-Unis.
-Tous droits re'serve's.
-
-
-Ce produit ou document est prote'ge' par un copyright et distribue' avec
-des licences qui en restreignent l'utilisation, la copie, la distribution,
-et la de'compilation. Aucune partie de ce produit ou de sa documentation
-associe'e ne peut e^tre reproduite sous aucune forme, par quelque moyen
-que ce soit, sans l'autorisation pre'alable et e'crite de Sun et de ses
-bailleurs de licence, s'il y en a.
-
-Le logiciel de'tenu par des tiers, et qui comprend la technologie
-relative aux polices de caracte`res, est prote'ge' par un copyright
-et licencie' par des fournisseurs de Sun.
-
-Sun, Sun Microsystems, le logo Sun, Solaris, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail, et Enterprise JavaBeans,
-sont des marques de fabrique ou des marques de'pose'es de Sun
-Microsystems, Inc. aux Etats-Unis et dans d'autres pays.
-
-Toutes les marques SPARC sont utilise'es sous licence et sont
-des marques de fabrique ou des marques de'pose'es de SPARC
-International, Inc. aux Etats-Unis et dans
-d'autres pays. Les produits portant les marques SPARC sont
-base's sur une architecture de'veloppe'e par Sun Microsystems, Inc.
-
-Postcript est une marque enregistre'e d'Adobe Systems Inc.
-
-LA DOCUMENTATION EST FOURNIE "EN L'ETAT" ET TOUTES AUTRES CONDITIONS,
-DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT EXCLUES,
-DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT
-TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A L'APTITUDE
-A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE CONTREFACON.
--->
-
<!--
This is the XML DTD for the Servlet 2.3 deployment descriptor.
All Servlet 2.3 deployment descriptors must include a DOCTYPE
Modified: trunk/java/javax/servlet/resources/web-app_2_4.xsd
===================================================================
--- trunk/java/javax/servlet/resources/web-app_2_4.xsd 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/resources/web-app_2_4.xsd 2009-01-16 16:10:23 UTC (rev 905)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -14,7 +15,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://java.sun.com/xml/ns/j2ee"
xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
@@ -770,7 +770,7 @@
<xsd:simpleContent>
<xsd:restriction base="j2ee:string">
- <xsd:pattern value="[\p{L}\-\p{Nd}]+/[\p{L}\-\p{Nd}\.]+"/>
+ <xsd:pattern value="[^\p{Cc}^\s]+/[^\p{Cc}^\s]+"/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
Modified: trunk/java/javax/servlet/resources/web-app_2_5.xsd
===================================================================
--- trunk/java/javax/servlet/resources/web-app_2_5.xsd 2009-01-15 15:56:37 UTC (rev 904)
+++ trunk/java/javax/servlet/resources/web-app_2_5.xsd 2009-01-16 16:10:23 UTC (rev 905)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -14,7 +15,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://java.sun.com/xml/ns/javaee"
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
@@ -473,14 +473,14 @@
<xsd:attribute name="id" type="xsd:ID" />
</xsd:complexType>
<!-- **************************************************** -->
- <xsd:simpleType name="�?http-methodType�?">
+ <xsd:simpleType name="http-methodType">
<xsd:annotation>
<xsd:documentation>
A HTTP method type as defined in HTTP 1.1 section 2.2.
</xsd:documentation>
</xsd:annotation>
- <xsd:restriction base="�?xsd:token�?">
- <xsd:pattern value="�?[\p{L}-[\p{Cc}\p{Z}]]+�?" />
+ <xsd:restriction base="xsd:token">
+ <xsd:pattern value="[\p{L}-[\p{Cc}\p{Z}]]+" />
</xsd:restriction>
</xsd:simpleType>
15 years, 11 months
JBossWeb SVN: r904 - trunk.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-01-15 10:56:37 -0500 (Thu, 15 Jan 2009)
New Revision: 904
Modified:
trunk/build.properties.default
Log:
- Use Java 6.
Modified: trunk/build.properties.default
===================================================================
--- trunk/build.properties.default 2009-01-15 15:56:18 UTC (rev 903)
+++ trunk/build.properties.default 2009-01-15 15:56:37 UTC (rev 904)
@@ -10,9 +10,9 @@
# -----------------------------------------------------------------------------
# ----- Version Control Flags -----
-version.major=2
-version.minor=1
-version.build=1
+version.major=3
+version.minor=0
+version.build=0
version.patch=0
version.tag=SNAPSHOT
@@ -24,8 +24,8 @@
#base.path=C:/path/to/the/repository
#base.path=/usr/local
-compile.source=1.5
-compile.target=1.5
+compile.source=1.6
+compile.target=1.6
compile.debug=true
base-commons.loc=http://archive.apache.org/dist/commons
15 years, 11 months
JBossWeb SVN: r903 - branches/2.1.x.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-01-15 10:56:18 -0500 (Thu, 15 Jan 2009)
New Revision: 903
Removed:
branches/2.1.x/ROADMAP.txt
Modified:
branches/2.1.x/PATCHES.txt
Log:
- Remove the Servlet 3.0 specific stuff.
Modified: branches/2.1.x/PATCHES.txt
===================================================================
--- branches/2.1.x/PATCHES.txt 2009-01-15 15:51:01 UTC (rev 902)
+++ branches/2.1.x/PATCHES.txt 2009-01-15 15:56:18 UTC (rev 903)
@@ -43,9 +43,3 @@
733748
SSL session tracking (may not be practical at all)
-
-733768 733769 733775
-Generics in Servlet API (not accepted yet)
-
-733771
-Deprecate some wrapper methods in Servlet API (not accepted yet)
Deleted: branches/2.1.x/ROADMAP.txt
===================================================================
--- branches/2.1.x/ROADMAP.txt 2009-01-15 15:51:01 UTC (rev 902)
+++ branches/2.1.x/ROADMAP.txt 2009-01-15 15:56:18 UTC (rev 903)
@@ -1,23 +0,0 @@
-Roadmap for JBoss Web 3.0
-
-Main development:
-- Setup standalone TCK environment for testing compliance with the new features
-- Implement Servlet 3.0 async for APR HTTP connector
-- Update digester XML parsing rules for web.xml updates
-- Implement new APIs for programmatic deployment descriptor access
-- Implement annotation scanning for JBoss Web standalone (likely disabled by default using conf/web.xml)
-- Implement any other Servlet 3.0 changes (web.xml fragments, security, etc)
-- Implement Servlet 3.0 async for APR AJP connector
-- Implement Servlet 3.0 async for java.io HTTP connector
-- Implement Servlet 3.0 async for java.io AJP connector
-- Implement JSP 2.2 changes
-- Implement EL 1.1 changes
-- Coordinate with AS 6 to implement new web.xml parsing (out of tree)
-- Coordinate with AS 6 for annotation updates (out of tree)
-
-Other:
-- Diagnostic and monitoring features
-- .net support like the php support (looks ok, but PHP is hard to use, how would this be different ?)
-- fastcgi servlet (sounds useless)
-- Java proxy (probably too many components needed to compete with mod_cluster, but a very basic HTTP proxy could be useful
- for the rewrite valve)
15 years, 11 months
JBossWeb SVN: r902 - branches.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-01-15 10:51:01 -0500 (Thu, 15 Jan 2009)
New Revision: 902
Added:
branches/2.1.x/
Log:
- Branch JBoss Web 2.1.
Copied: branches/2.1.x (from rev 901, trunk)
15 years, 11 months
JBossWeb SVN: r901 - in trunk/java/org/apache: catalina/core and 4 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-01-15 10:49:36 -0500 (Thu, 15 Jan 2009)
New Revision: 901
Modified:
trunk/java/org/apache/catalina/connector/Request.java
trunk/java/org/apache/catalina/core/ApplicationContext.java
trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
trunk/java/org/apache/catalina/servlets/WebdavServlet.java
trunk/java/org/apache/catalina/ssi/SSIServletRequestUtil.java
trunk/java/org/apache/catalina/util/RequestUtil.java
trunk/java/org/apache/naming/resources/FileDirContext.java
Log:
- Refactor all String based normalization as one.
Modified: trunk/java/org/apache/catalina/connector/Request.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Request.java 2009-01-13 14:52:23 UTC (rev 900)
+++ trunk/java/org/apache/catalina/connector/Request.java 2009-01-15 15:49:36 UTC (rev 901)
@@ -57,7 +57,6 @@
import org.apache.catalina.realm.GenericPrincipal;
import org.apache.catalina.util.Enumerator;
import org.apache.catalina.util.ParameterMap;
-import org.apache.catalina.util.RequestUtil;
import org.apache.catalina.util.StringManager;
import org.apache.catalina.util.StringParser;
import org.apache.coyote.ActionCode;
@@ -1299,10 +1298,9 @@
int pos = requestPath.lastIndexOf('/');
String relative = null;
if (pos >= 0) {
- relative = RequestUtil.normalize
- (requestPath.substring(0, pos + 1) + path);
+ relative = requestPath.substring(0, pos + 1) + path;
} else {
- relative = RequestUtil.normalize(requestPath + path);
+ relative = requestPath + path;
}
return (context.getServletContext().getRequestDispatcher(relative));
Modified: trunk/java/org/apache/catalina/core/ApplicationContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/ApplicationContext.java 2009-01-13 14:52:23 UTC (rev 900)
+++ trunk/java/org/apache/catalina/core/ApplicationContext.java 2009-01-15 15:49:36 UTC (rev 901)
@@ -45,6 +45,7 @@
import org.apache.catalina.Wrapper;
import org.apache.catalina.deploy.ApplicationParameter;
import org.apache.catalina.util.Enumerator;
+import org.apache.catalina.util.RequestUtil;
import org.apache.catalina.util.ResourceSet;
import org.apache.catalina.util.ServerInfo;
import org.apache.catalina.util.StringManager;
@@ -378,7 +379,7 @@
path = path.substring(0, pos);
}
- path = normalize(path);
+ path = RequestUtil.normalize(path);
if (path == null)
return (null);
@@ -461,7 +462,7 @@
throw new MalformedURLException(sm.getString("applicationContext.requestDispatcher.iae", path));
}
- path = normalize(path);
+ path = RequestUtil.normalize(path);
if (path == null)
return (null);
@@ -510,10 +511,13 @@
*/
public InputStream getResourceAsStream(String path) {
- path = normalize(path);
if (path == null || (Globals.STRICT_SERVLET_COMPLIANCE && !path.startsWith("/")))
return (null);
+ path = RequestUtil.normalize(path);
+ if (path == null)
+ return (null);
+
DirContext resources = context.getResources();
if (resources != null) {
try {
@@ -546,7 +550,7 @@
(sm.getString("applicationContext.resourcePaths.iae", path));
}
- path = normalize(path);
+ path = RequestUtil.normalize(path);
if (path == null)
return (null);
@@ -853,45 +857,6 @@
/**
- * Return a context-relative path, beginning with a "/", that represents
- * the canonical version of the specified path after ".." and "." elements
- * are resolved out. If the specified path attempts to go outside the
- * boundaries of the current context (i.e. too many ".." path elements
- * are present), return <code>null</code> instead.
- *
- * @param path Path to be normalized
- */
- private String normalize(String path) {
-
- if (path == null) {
- return null;
- }
-
- String normalized = path;
-
- // Normalize the slashes
- if (normalized.indexOf('\\') >= 0)
- normalized = normalized.replace('\\', '/');
-
- // Resolve occurrences of "/../" in the normalized path
- while (true) {
- int index = normalized.indexOf("/../");
- if (index < 0)
- break;
- if (index == 0)
- return (null); // Trying to go outside our context
- int index2 = normalized.lastIndexOf('/', index - 1);
- normalized = normalized.substring(0, index2) +
- normalized.substring(index + 3);
- }
-
- // Return the normalized path that we have completed
- return (normalized);
-
- }
-
-
- /**
* Merge the context initialization parameters specified in the application
* deployment descriptor with the application parameters described in the
* server configuration, respecting the <code>override</code> property of
Modified: trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
===================================================================
--- trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java 2009-01-13 14:52:23 UTC (rev 900)
+++ trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java 2009-01-15 15:49:36 UTC (rev 901)
@@ -318,10 +318,9 @@
int pos = requestPath.lastIndexOf('/');
String relative = null;
if (pos >= 0) {
- relative = RequestUtil.normalize
- (requestPath.substring(0, pos + 1) + path);
+ relative = requestPath.substring(0, pos + 1) + path;
} else {
- relative = RequestUtil.normalize(requestPath + path);
+ relative = requestPath + path;
}
return (context.getServletContext().getRequestDispatcher(relative));
Modified: trunk/java/org/apache/catalina/servlets/WebdavServlet.java
===================================================================
--- trunk/java/org/apache/catalina/servlets/WebdavServlet.java 2009-01-13 14:52:23 UTC (rev 900)
+++ trunk/java/org/apache/catalina/servlets/WebdavServlet.java 2009-01-15 15:49:36 UTC (rev 901)
@@ -1418,71 +1418,6 @@
}
- /**
- * Return a context-relative path, beginning with a "/", that represents
- * the canonical version of the specified path after ".." and "." elements
- * are resolved out. If the specified path attempts to go outside the
- * boundaries of the current context (i.e. too many ".." path elements
- * are present), return <code>null</code> instead.
- *
- * @param path Path to be normalized
- */
- protected String normalize(String path) {
-
- if (path == null)
- return null;
-
- // Create a place for the normalized path
- String normalized = path;
-
- if (normalized == null)
- return (null);
-
- if (normalized.equals("/."))
- return "/";
-
- // Normalize the slashes and add leading slash if necessary
- if (normalized.indexOf('\\') >= 0)
- normalized = normalized.replace('\\', '/');
- if (!normalized.startsWith("/"))
- normalized = "/" + normalized;
-
- // Resolve occurrences of "//" in the normalized path
- while (true) {
- int index = normalized.indexOf("//");
- if (index < 0)
- break;
- normalized = normalized.substring(0, index) +
- normalized.substring(index + 1);
- }
-
- // Resolve occurrences of "/./" in the normalized path
- while (true) {
- int index = normalized.indexOf("/./");
- if (index < 0)
- break;
- normalized = normalized.substring(0, index) +
- normalized.substring(index + 2);
- }
-
- // Resolve occurrences of "/../" in the normalized path
- while (true) {
- int index = normalized.indexOf("/../");
- if (index < 0)
- break;
- if (index == 0)
- return (null); // Trying to go outside our context
- int index2 = normalized.lastIndexOf('/', index - 1);
- normalized = normalized.substring(0, index2) +
- normalized.substring(index + 3);
- }
-
- // Return the normalized path that we have completed
- return (normalized);
-
- }
-
-
// -------------------------------------------------------- Private Methods
/**
@@ -1637,7 +1572,7 @@
}
// Normalise destination path (remove '.' and '..')
- destinationPath = normalize(destinationPath);
+ destinationPath = RequestUtil.normalize(destinationPath);
String contextPath = req.getContextPath();
if ((contextPath != null) &&
@@ -2389,7 +2324,7 @@
if (!toAppend.startsWith("/"))
toAppend = "/" + toAppend;
- generatedXML.writeText(rewriteUrl(normalize(absoluteUri + toAppend)));
+ generatedXML.writeText(rewriteUrl(RequestUtil.normalize(absoluteUri + toAppend)));
generatedXML.writeElement(null, "href", XMLWriter.CLOSING);
Modified: trunk/java/org/apache/catalina/ssi/SSIServletRequestUtil.java
===================================================================
--- trunk/java/org/apache/catalina/ssi/SSIServletRequestUtil.java 2009-01-13 14:52:23 UTC (rev 900)
+++ trunk/java/org/apache/catalina/ssi/SSIServletRequestUtil.java 2009-01-15 15:49:36 UTC (rev 901)
@@ -65,13 +65,6 @@
* Path to be normalized
*/
public static String normalize(String path) {
- if (path == null) return null;
- String normalized = path;
- //Why doesn't RequestUtil do this??
- // Normalize the slashes and add leading slash if necessary
- if (normalized.indexOf('\\') >= 0)
- normalized = normalized.replace('\\', '/');
- normalized = RequestUtil.normalize(path);
- return normalized;
+ return RequestUtil.normalize(path);
}
}
\ No newline at end of file
Modified: trunk/java/org/apache/catalina/util/RequestUtil.java
===================================================================
--- trunk/java/org/apache/catalina/util/RequestUtil.java 2009-01-13 14:52:23 UTC (rev 900)
+++ trunk/java/org/apache/catalina/util/RequestUtil.java 2009-01-15 15:49:36 UTC (rev 901)
@@ -93,13 +93,29 @@
* @param path Relative path to be normalized
*/
public static String normalize(String path) {
+ return normalize(path, true);
+ }
+ /**
+ * Normalize a relative URI path that may have relative values ("/./",
+ * "/../", and so on ) it it. <strong>WARNING</strong> - This method is
+ * useful only for normalizing application-generated paths. It does not
+ * try to perform security checks for malicious input.
+ *
+ * @param path Relative path to be normalized
+ * @param replaceBackSlash Should '\\' be replaced with '/'
+ */
+ public static String normalize(String path, boolean replaceBackSlash) {
+
if (path == null)
return null;
// Create a place for the normalized path
String normalized = path;
+ if (replaceBackSlash && normalized.indexOf('\\') >= 0)
+ normalized = normalized.replace('\\', '/');
+
if (normalized.equals("/."))
return "/";
Modified: trunk/java/org/apache/naming/resources/FileDirContext.java
===================================================================
--- trunk/java/org/apache/naming/resources/FileDirContext.java 2009-01-13 14:52:23 UTC (rev 900)
+++ trunk/java/org/apache/naming/resources/FileDirContext.java 2009-01-15 15:49:36 UTC (rev 901)
@@ -29,14 +29,21 @@
import java.util.Hashtable;
import javax.naming.NameAlreadyBoundException;
+import javax.naming.NameNotFoundException;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
+import javax.naming.NotContextException;
import javax.naming.OperationNotSupportedException;
+import javax.naming.directory.AttributeModificationException;
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
+import javax.naming.directory.InvalidAttributesException;
+import javax.naming.directory.InvalidSearchControlsException;
+import javax.naming.directory.InvalidSearchFilterException;
import javax.naming.directory.ModificationItem;
import javax.naming.directory.SearchControls;
+import org.apache.catalina.util.RequestUtil;
import org.apache.naming.NamingContextBindingsEnumeration;
import org.apache.naming.NamingContextEnumeration;
import org.apache.naming.NamingEntry;
@@ -754,61 +761,11 @@
// ------------------------------------------------------ Protected Methods
- /**
- * Return a context-relative path, beginning with a "/", that represents
- * the canonical version of the specified path after ".." and "." elements
- * are resolved out. If the specified path attempts to go outside the
- * boundaries of the current context (i.e. too many ".." path elements
- * are present), return <code>null</code> instead.
- *
- * @param path Path to be normalized
- */
- protected String normalize(String path) {
-
- String normalized = path;
-
- // Normalize the slashes and add leading slash if necessary
- if (File.separatorChar == '\\' && normalized.indexOf('\\') >= 0)
- normalized = normalized.replace('\\', '/');
- if (!normalized.startsWith("/"))
- normalized = "/" + normalized;
-
- // Resolve occurrences of "//" in the normalized path
- while (true) {
- int index = normalized.indexOf("//");
- if (index < 0)
- break;
- normalized = normalized.substring(0, index) +
- normalized.substring(index + 1);
+ protected static String normalize(String path) {
+ return RequestUtil.normalize(path, File.separatorChar == '\\');
}
- // Resolve occurrences of "/./" in the normalized path
- while (true) {
- int index = normalized.indexOf("/./");
- if (index < 0)
- break;
- normalized = normalized.substring(0, index) +
- normalized.substring(index + 2);
- }
- // Resolve occurrences of "/../" in the normalized path
- while (true) {
- int index = normalized.indexOf("/../");
- if (index < 0)
- break;
- if (index == 0)
- return (null); // Trying to go outside our context
- int index2 = normalized.lastIndexOf('/', index - 1);
- normalized = normalized.substring(0, index2) +
- normalized.substring(index + 3);
- }
-
- // Return the normalized path that we have completed
- return (normalized);
-
- }
-
-
/**
* Return a File object representing the specified normalized
* context-relative path if it exists and is readable. Otherwise,
15 years, 11 months
JBossWeb SVN: r900 - in trunk: java/org/apache/jasper/compiler and 2 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-01-13 09:52:23 -0500 (Tue, 13 Jan 2009)
New Revision: 900
Modified:
trunk/PATCHES.txt
trunk/java/org/apache/jasper/compiler/Generator.java
trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
trunk/webapps/docs/changelog.xml
Log:
- Revert Jasper patch.
Modified: trunk/PATCHES.txt
===================================================================
--- trunk/PATCHES.txt 2009-01-12 16:18:42 UTC (rev 899)
+++ trunk/PATCHES.txt 2009-01-13 14:52:23 UTC (rev 900)
@@ -40,3 +40,12 @@
various
New JDBC pool module
+
+733748
+SSL session tracking (may not be practical at all)
+
+733768 733769 733775
+Generics in Servlet API (not accepted yet)
+
+733771
+Deprecate some wrapper methods in Servlet API (not accepted yet)
Modified: trunk/java/org/apache/jasper/compiler/Generator.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/Generator.java 2009-01-12 16:18:42 UTC (rev 899)
+++ trunk/java/org/apache/jasper/compiler/Generator.java 2009-01-13 14:52:23 UTC (rev 900)
@@ -2050,6 +2050,9 @@
n.setBeginJavaLine(out.getJavaLine());
+ // Copy virtual page scope of tag file to page scope of invoking
+ // page
+ out.printil("((org.apache.jasper.runtime.JspContextWrapper) this.jspContext).syncBeforeInvoke();");
String varReaderAttr = n.getTextAttribute("varReader");
String varAttr = n.getTextAttribute("var");
if (varReaderAttr != null || varAttr != null) {
@@ -2063,11 +2066,6 @@
out.print(toGetterMethod(n.getTextAttribute("fragment")));
out.println(" != null) {");
out.pushIndent();
- // Copy virtual page scope of tag file to page scope of invoking
- // page
- out.printil("((org.apache.jasper.runtime.JspContextWrapper) this.jspContext).syncBeforeInvoke(");
- out.print(toGetterMethod(n.getTextAttribute("fragment")));
- out.println(".getJspContext());");
out.printin(toGetterMethod(n.getTextAttribute("fragment")));
out.println(".invoke(_jspx_sout);");
out.popIndent();
Modified: trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
===================================================================
--- trunk/java/org/apache/jasper/runtime/JspContextWrapper.java 2009-01-12 16:18:42 UTC (rev 899)
+++ trunk/java/org/apache/jasper/runtime/JspContextWrapper.java 2009-01-13 14:52:23 UTC (rev 900)
@@ -335,16 +335,6 @@
}
/**
- * Synchronize variables before fragment invokation
- * @param jspContext The JspContext the variable should sync to. This
- * is usually the context of the page where the fragment is.
- */
- public void syncBeforeInvoke(JspContext jspContext) {
- copyTagToPageScope(VariableInfo.NESTED, (PageContext)jspContext);
- copyTagToPageScope(VariableInfo.AT_BEGIN, (PageContext)jspContext);
- }
-
- /**
* Synchronize variables at end of tag file
*/
public void syncEndTagFile() {
@@ -361,17 +351,6 @@
* variable scope (one of NESTED, AT_BEGIN, or AT_END)
*/
private void copyTagToPageScope(int scope) {
- copyTagToPageScope(scope, invokingJspCtxt);
- }
-
- /**
- * Copies the variables of the given scope from the virtual page scope of
- * this JSP context wrapper to the page scope of the specified JSP context.
- *
- * @param scope variable scope (one of NESTED, AT_BEGIN, or AT_END)
- * @param jspContext the target context
- */
- private void copyTagToPageScope(int scope, PageContext jspContext) {
Iterator iter = null;
switch (scope) {
@@ -397,9 +376,9 @@
Object obj = getAttribute(varName);
varName = findAlias(varName);
if (obj != null) {
- jspContext.setAttribute(varName, obj);
+ invokingJspCtxt.setAttribute(varName, obj);
} else {
- jspContext.removeAttribute(varName, PAGE_SCOPE);
+ invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE);
}
}
}
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2009-01-12 16:18:42 UTC (rev 899)
+++ trunk/webapps/docs/changelog.xml 2009-01-13 14:52:23 UTC (rev 900)
@@ -126,9 +126,6 @@
<bug>46471</bug>: Use jar url and tag file path to uniquely ID a tag file to prevent naming
clashes. (markt)
</fix>
- <fix>
- <bug>46339</bug>: Fix variable sync problems for fragments. Submitted by Kin-Man Chung. (markt)
- </fix>
</changelog>
</subsection>
</section>
15 years, 11 months
JBossWeb SVN: r899 - tags.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-12 11:18:42 -0500 (Mon, 12 Jan 2009)
New Revision: 899
Added:
tags/JBOSSWEB_2_0_0_GA_CP09/
Log:
tag for the CP contains JBPAPP-869
Copied: tags/JBOSSWEB_2_0_0_GA_CP09 (from rev 898, branches/JBOSSWEB_2_0_0_GA_CP)
15 years, 11 months
JBossWeb SVN: r898 - in trunk: java/org/apache/jasper/runtime and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-01-09 11:08:38 -0500 (Fri, 09 Jan 2009)
New Revision: 898
Modified:
trunk/java/org/apache/jasper/compiler/Generator.java
trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
trunk/webapps/docs/changelog.xml
Log:
- Port Jasper patch.
Modified: trunk/java/org/apache/jasper/compiler/Generator.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/Generator.java 2009-01-09 11:58:24 UTC (rev 897)
+++ trunk/java/org/apache/jasper/compiler/Generator.java 2009-01-09 16:08:38 UTC (rev 898)
@@ -2050,9 +2050,6 @@
n.setBeginJavaLine(out.getJavaLine());
- // Copy virtual page scope of tag file to page scope of invoking
- // page
- out.printil("((org.apache.jasper.runtime.JspContextWrapper) this.jspContext).syncBeforeInvoke();");
String varReaderAttr = n.getTextAttribute("varReader");
String varAttr = n.getTextAttribute("var");
if (varReaderAttr != null || varAttr != null) {
@@ -2066,6 +2063,11 @@
out.print(toGetterMethod(n.getTextAttribute("fragment")));
out.println(" != null) {");
out.pushIndent();
+ // Copy virtual page scope of tag file to page scope of invoking
+ // page
+ out.printil("((org.apache.jasper.runtime.JspContextWrapper) this.jspContext).syncBeforeInvoke(");
+ out.print(toGetterMethod(n.getTextAttribute("fragment")));
+ out.println(".getJspContext());");
out.printin(toGetterMethod(n.getTextAttribute("fragment")));
out.println(".invoke(_jspx_sout);");
out.popIndent();
Modified: trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
===================================================================
--- trunk/java/org/apache/jasper/runtime/JspContextWrapper.java 2009-01-09 11:58:24 UTC (rev 897)
+++ trunk/java/org/apache/jasper/runtime/JspContextWrapper.java 2009-01-09 16:08:38 UTC (rev 898)
@@ -334,7 +334,17 @@
copyTagToPageScope(VariableInfo.AT_BEGIN);
}
- /**
+ /**
+ * Synchronize variables before fragment invokation
+ * @param jspContext The JspContext the variable should sync to. This
+ * is usually the context of the page where the fragment is.
+ */
+ public void syncBeforeInvoke(JspContext jspContext) {
+ copyTagToPageScope(VariableInfo.NESTED, (PageContext)jspContext);
+ copyTagToPageScope(VariableInfo.AT_BEGIN, (PageContext)jspContext);
+ }
+
+ /**
* Synchronize variables at end of tag file
*/
public void syncEndTagFile() {
@@ -351,6 +361,17 @@
* variable scope (one of NESTED, AT_BEGIN, or AT_END)
*/
private void copyTagToPageScope(int scope) {
+ copyTagToPageScope(scope, invokingJspCtxt);
+ }
+
+ /**
+ * Copies the variables of the given scope from the virtual page scope of
+ * this JSP context wrapper to the page scope of the specified JSP context.
+ *
+ * @param scope variable scope (one of NESTED, AT_BEGIN, or AT_END)
+ * @param jspContext the target context
+ */
+ private void copyTagToPageScope(int scope, PageContext jspContext) {
Iterator iter = null;
switch (scope) {
@@ -376,9 +397,9 @@
Object obj = getAttribute(varName);
varName = findAlias(varName);
if (obj != null) {
- invokingJspCtxt.setAttribute(varName, obj);
+ jspContext.setAttribute(varName, obj);
} else {
- invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE);
+ jspContext.removeAttribute(varName, PAGE_SCOPE);
}
}
}
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2009-01-09 11:58:24 UTC (rev 897)
+++ trunk/webapps/docs/changelog.xml 2009-01-09 16:08:38 UTC (rev 898)
@@ -126,6 +126,9 @@
<bug>46471</bug>: Use jar url and tag file path to uniquely ID a tag file to prevent naming
clashes. (markt)
</fix>
+ <fix>
+ <bug>46339</bug>: Fix variable sync problems for fragments. Submitted by Kin-Man Chung. (markt)
+ </fix>
</changelog>
</subsection>
</section>
15 years, 11 months
JBossWeb SVN: r897 - branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/loader.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-09 06:58:24 -0500 (Fri, 09 Jan 2009)
New Revision: 897
Modified:
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/loader/WebappClassLoader.java
Log:
Hack for JBPAPP-869.
Modified: branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/loader/WebappClassLoader.java
===================================================================
--- branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/loader/WebappClassLoader.java 2009-01-07 15:37:49 UTC (rev 896)
+++ branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/loader/WebappClassLoader.java 2009-01-09 11:58:24 UTC (rev 897)
@@ -111,6 +111,10 @@
public static final boolean ENABLE_CLEAR_REFERENCES =
Boolean.valueOf(System.getProperty("org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES", "true")).booleanValue();
+
+ public static final boolean SYSTEM_CL_DELEGATION =
+ Boolean.valueOf(System.getProperty("org.apache.catalina.loader.WebappClassLoader.SYSTEM_CL_DELEGATION", "true")).booleanValue();
+
protected class PrivilegedFindResource
implements PrivilegedAction {
@@ -1269,15 +1273,17 @@
// (0.2) Try loading the class with the system class loader, to prevent
// the webapp from overriding J2SE classes
- try {
- clazz = system.loadClass(name);
- if (clazz != null) {
- if (resolve)
- resolveClass(clazz);
- return (clazz);
+ if (SYSTEM_CL_DELEGATION) {
+ try {
+ clazz = system.loadClass(name);
+ if (clazz != null) {
+ if (resolve)
+ resolveClass(clazz);
+ return (clazz);
+ }
+ } catch (ClassNotFoundException e) {
+ // Ignore
}
- } catch (ClassNotFoundException e) {
- // Ignore
}
// (0.5) Permission to access this class when using a SecurityManager
15 years, 11 months