JBossWeb SVN: r954 - in trunk: java/org/apache/catalina/startup and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-03-11 20:48:22 -0400 (Wed, 11 Mar 2009)
New Revision: 954
Modified:
trunk/PATCHES.txt
trunk/java/org/apache/catalina/startup/Constants.java
trunk/java/org/apache/catalina/startup/DigesterFactory.java
Log:
- Port patch. Small refactoring for validation.
Modified: trunk/PATCHES.txt
===================================================================
--- trunk/PATCHES.txt 2009-03-11 00:23:41 UTC (rev 953)
+++ trunk/PATCHES.txt 2009-03-12 00:48:22 UTC (rev 954)
@@ -53,4 +53,6 @@
751502
Per context validation (incomplete, and looks a bit useless anyway)
+752651
+XmlBase configuration
Modified: trunk/java/org/apache/catalina/startup/Constants.java
===================================================================
--- trunk/java/org/apache/catalina/startup/Constants.java 2009-03-11 00:23:41 UTC (rev 953)
+++ trunk/java/org/apache/catalina/startup/Constants.java 2009-03-12 00:48:22 UTC (rev 954)
@@ -83,11 +83,26 @@
public static final String J2eeSchemaResourcePath_14 =
"/javax/servlet/resources/j2ee_1_4.xsd";
+ public static final String JavaeeSchemaPublicId_5 =
+ "javaee_5.xsd";
+ public static final String JavaeeSchemaResourcePath_5 =
+ "/javax/servlet/resources/javaee_5.xsd";
+
public static final String W3cSchemaPublicId_10 =
"xml.xsd";
public static final String W3cSchemaResourcePath_10 =
"/javax/servlet/resources/xml.xsd";
+ public static final String W3cSchemaDTDPublicId_10 =
+ "XMLSchema.dtd";
+ public static final String W3cSchemaDTDResourcePath_10 =
+ "/javax/servlet/resources/XMLSchema.dtd";
+
+ public static final String W3cDatatypesDTDPublicId_10 =
+ "datatypes.dtd";
+ public static final String W3cDatatypesDTDResourcePath_10 =
+ "/javax/servlet/resources/datatypes.dtd";
+
public static final String JspSchemaPublicId_20 =
"jsp_2_0.xsd";
public static final String JspSchemaResourcePath_20 =
@@ -108,4 +123,14 @@
public static final String J2eeWebServiceClientSchemaResourcePath_11 =
"/javax/servlet/resources/j2ee_web_services_client_1_1.xsd";
+ public static final String JavaeeWebServiceSchemaPublicId_12 =
+ "javaee_web_services_1_2.xsd";
+ public static final String JavaeeWebServiceSchemaResourcePath_12 =
+ "/javax/servlet/resources/javaee_web_services_1_2.xsd";
+
+ public static final String JavaeeWebServiceClientSchemaPublicId_12 =
+ "javaee_web_services_client_1_2.xsd";
+ public static final String JavaeeWebServiceClientSchemaResourcePath_12 =
+ "/javax/servlet/resources/javaee_web_services_client_1_2.xsd";
+
}
Modified: trunk/java/org/apache/catalina/startup/DigesterFactory.java
===================================================================
--- trunk/java/org/apache/catalina/startup/DigesterFactory.java 2009-03-11 00:23:41 UTC (rev 953)
+++ trunk/java/org/apache/catalina/startup/DigesterFactory.java 2009-03-12 00:48:22 UTC (rev 954)
@@ -37,12 +37,6 @@
org.jboss.logging.Logger.getLogger(DigesterFactory.class);
/**
- * The XML entiry resolver used by the Digester.
- */
- private static SchemaResolver schemaResolver;
-
-
- /**
* Create a <code>Digester</code> parser with no <code>Rule</code>
* associated and XML validation turned off.
*/
@@ -78,8 +72,8 @@
configureSchema(digester);
}
- schemaResolver = new SchemaResolver(digester);
- registerLocalSchema();
+ SchemaResolver schemaResolver = new SchemaResolver(digester);
+ registerLocalSchema(schemaResolver);
digester.setEntityResolver(schemaResolver);
if ( rule != null ) {
@@ -94,60 +88,101 @@
* Utilities used to force the parser to use local schema, when available,
* instead of the <code>schemaLocation</code> XML element.
*/
- protected static void registerLocalSchema(){
+ protected static void registerLocalSchema(SchemaResolver schemaResolver){
// J2EE
register(Constants.J2eeSchemaResourcePath_14,
- Constants.J2eeSchemaPublicId_14);
+ Constants.J2eeSchemaPublicId_14,
+ schemaResolver);
+
+ /* FIXME: Add javaee_5.xsd
+ register(Constants.JavaeeSchemaResourcePath_5,
+ Constants.JavaeeSchemaPublicId_5,
+ schemaResolver);
+ */
+
// W3C
register(Constants.W3cSchemaResourcePath_10,
- Constants.W3cSchemaPublicId_10);
+ Constants.W3cSchemaPublicId_10,
+ schemaResolver);
+
+ register(Constants.W3cSchemaDTDResourcePath_10,
+ Constants.W3cSchemaDTDPublicId_10,
+ schemaResolver);
+
+ register(Constants.W3cDatatypesDTDResourcePath_10,
+ Constants.W3cDatatypesDTDPublicId_10,
+ schemaResolver);
+
// JSP
register(Constants.JspSchemaResourcePath_20,
- Constants.JspSchemaPublicId_20);
+ Constants.JspSchemaPublicId_20,
+ schemaResolver);
register(Constants.JspSchemaResourcePath_21,
- Constants.JspSchemaPublicId_21);
+ Constants.JspSchemaPublicId_21,
+ schemaResolver);
// TLD
register(Constants.TldDtdResourcePath_11,
- Constants.TldDtdPublicId_11);
+ Constants.TldDtdPublicId_11,
+ schemaResolver);
register(Constants.TldDtdResourcePath_12,
- Constants.TldDtdPublicId_12);
+ Constants.TldDtdPublicId_12,
+ schemaResolver);
register(Constants.TldSchemaResourcePath_20,
- Constants.TldSchemaPublicId_20);
+ Constants.TldSchemaPublicId_20,
+ schemaResolver);
register(Constants.TldSchemaResourcePath_21,
- Constants.TldSchemaPublicId_21);
+ Constants.TldSchemaPublicId_21,
+ schemaResolver);
// web.xml
register(Constants.WebDtdResourcePath_22,
- Constants.WebDtdPublicId_22);
+ Constants.WebDtdPublicId_22,
+ schemaResolver);
register(Constants.WebDtdResourcePath_23,
- Constants.WebDtdPublicId_23);
+ Constants.WebDtdPublicId_23,
+ schemaResolver);
register(Constants.WebSchemaResourcePath_24,
- Constants.WebSchemaPublicId_24);
+ Constants.WebSchemaPublicId_24,
+ schemaResolver);
register(Constants.WebSchemaResourcePath_25,
- Constants.WebSchemaPublicId_25);
+ Constants.WebSchemaPublicId_25,
+ schemaResolver);
// Web Service
register(Constants.J2eeWebServiceSchemaResourcePath_11,
- Constants.J2eeWebServiceSchemaPublicId_11);
+ Constants.J2eeWebServiceSchemaPublicId_11,
+ schemaResolver);
register(Constants.J2eeWebServiceClientSchemaResourcePath_11,
- Constants.J2eeWebServiceClientSchemaPublicId_11);
+ Constants.J2eeWebServiceClientSchemaPublicId_11,
+ schemaResolver);
+ /* FIXME
+ register(Constants.JavaeeWebServiceSchemaResourcePath_12,
+ Constants.JavaeeWebServiceSchemaPublicId_12,
+ schemaResolver);
+
+ register(Constants.JavaeeWebServiceClientSchemaResourcePath_12,
+ Constants.JavaeeWebServiceClientSchemaPublicId_12,
+ schemaResolver);
+ */
+
}
/**
* Load the resource and add it to the resolver.
*/
- protected static void register(String resourceURL, String resourcePublicId){
+ protected static void register(String resourceURL, String resourcePublicId,
+ SchemaResolver schemaResolver){
URL url = DigesterFactory.class.getResource(resourceURL);
if(url == null) {
@@ -163,11 +198,11 @@
*/
protected static void configureSchema(Digester digester){
URL url = DigesterFactory.class
- .getResource(Constants.WebSchemaResourcePath_24);
+ .getResource(Constants.WebSchemaResourcePath_25);
if(url == null) {
log.error("Could not get url for "
- + Constants.WebSchemaResourcePath_24);
+ + Constants.WebSchemaResourcePath_25);
} else {
digester.setSchema(url.toString());
}
15 years, 6 months
JBossWeb SVN: r953 - trunk/java/org/apache/catalina/core.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-03-10 20:23:41 -0400 (Tue, 10 Mar 2009)
New Revision: 953
Added:
trunk/java/org/apache/catalina/core/StandardFilterFacade.java
Modified:
trunk/java/org/apache/catalina/core/JasperListener.java
Log:
- Add a facade object of sorts to implement FilterRegistration (unlike for StandardWrapper, there's no concrete object for
filters in Catalina).
Modified: trunk/java/org/apache/catalina/core/JasperListener.java
===================================================================
--- trunk/java/org/apache/catalina/core/JasperListener.java 2009-03-11 00:22:18 UTC (rev 952)
+++ trunk/java/org/apache/catalina/core/JasperListener.java 2009-03-11 00:23:41 UTC (rev 953)
@@ -23,7 +23,6 @@
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.util.StringManager;
import org.jboss.logging.Logger;
-import org.jboss.logging.Logger;
/**
Added: trunk/java/org/apache/catalina/core/StandardFilterFacade.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardFilterFacade.java (rev 0)
+++ trunk/java/org/apache/catalina/core/StandardFilterFacade.java 2009-03-11 00:23:41 UTC (rev 953)
@@ -0,0 +1,117 @@
+/*
+ * 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 org.apache.catalina.core;
+
+
+import java.util.EnumSet;
+import java.util.Map;
+
+import javax.servlet.DispatcherType;
+import javax.servlet.FilterRegistration;
+
+import org.apache.catalina.Context;
+import org.apache.catalina.deploy.FilterDef;
+
+
+/**
+ * Facade for the <b>FilterDef</b> object, with a hook to the Context to
+ * store them automatically.
+ *
+ * @author Remy Maucharat
+ * @version $Revision: 947 $ $Date: 2009-03-10 05:02:22 +0100 (Tue, 10 Mar 2009) $
+ */
+
+public final class StandardFilterFacade
+ implements FilterRegistration {
+
+
+ // ----------------------------------------------------------- Constructors
+
+
+ /**
+ * Create a new facede around a StandardWrapper.
+ */
+ public StandardFilterFacade(Context context, FilterDef filterDef) {
+
+ super();
+ this.context = context;
+ this.filterDef = filterDef;
+
+ }
+
+
+ // ----------------------------------------------------- Instance Variables
+
+
+ /**
+ * Associated context.
+ */
+ private Context context = null;
+
+
+ /**
+ * Wrapped filter def (facade).
+ */
+ private FilterDef filterDef = null;
+
+
+ // --------------------------------------------- FilterRegistration Methods
+
+
+ public void addMappingForServletNames(
+ EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter,
+ String... servletNames) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+ public void addMappingForUrlPatterns(
+ EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter,
+ String... urlPatterns) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+ public void setAsyncSupported(boolean asyncSupported) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+ public boolean setDescription(String description) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+
+ public boolean setInitParameter(String name, String value) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+
+ public void setInitParameters(Map<String, String> initParameters) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+}
15 years, 6 months
JBossWeb SVN: r952 - trunk/java/org/apache/juli.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-03-10 20:22:18 -0400 (Tue, 10 Mar 2009)
New Revision: 952
Modified:
trunk/java/org/apache/juli/ClassLoaderLogManager.java
Log:
- Port patch: load the whole hierarchy.
Modified: trunk/java/org/apache/juli/ClassLoaderLogManager.java
===================================================================
--- trunk/java/org/apache/juli/ClassLoaderLogManager.java 2009-03-10 12:13:26 UTC (rev 951)
+++ trunk/java/org/apache/juli/ClassLoaderLogManager.java 2009-03-11 00:22:18 UTC (rev 952)
@@ -101,15 +101,11 @@
}
}
- // If any parent loggers have levels definied, make sure they are
- // instantiated
+ // Instantiate all parent loggers
int dotIndex = loggerName.lastIndexOf('.');
while (dotIndex >= 0) {
final String parentName = loggerName.substring(0, dotIndex);
- if (getProperty(parentName + ".level") != null) {
- Logger.getLogger(parentName);
- break;
- }
+ Logger.getLogger(parentName);
dotIndex = loggerName.lastIndexOf('.', dotIndex - 1);
}
15 years, 6 months
JBossWeb SVN: r951 - branches/2.1.x/java/org/apache/juli.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-03-10 08:13:26 -0400 (Tue, 10 Mar 2009)
New Revision: 951
Modified:
branches/2.1.x/java/org/apache/juli/OneLineFormatter.java
Log:
- Port patch: 24 hour format.
Modified: branches/2.1.x/java/org/apache/juli/OneLineFormatter.java
===================================================================
--- branches/2.1.x/java/org/apache/juli/OneLineFormatter.java 2009-03-10 12:13:21 UTC (rev 950)
+++ branches/2.1.x/java/org/apache/juli/OneLineFormatter.java 2009-03-10 12:13:26 UTC (rev 951)
@@ -47,7 +47,7 @@
private final SimpleDateFormat monthFormatter = new SimpleDateFormat("MM");
private final SimpleDateFormat yearFormatter = new SimpleDateFormat("yyyy");
private final SimpleDateFormat timeFormatter =
- new SimpleDateFormat("hh:mm:ss");
+ new SimpleDateFormat("HH:mm:ss");
private Date currentDate;
private String currentDateString;
15 years, 6 months
JBossWeb SVN: r950 - trunk/java/org/apache/juli.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-03-10 08:13:21 -0400 (Tue, 10 Mar 2009)
New Revision: 950
Modified:
trunk/java/org/apache/juli/OneLineFormatter.java
Log:
- Port patch: 24 hour format.
Modified: trunk/java/org/apache/juli/OneLineFormatter.java
===================================================================
--- trunk/java/org/apache/juli/OneLineFormatter.java 2009-03-10 12:07:57 UTC (rev 949)
+++ trunk/java/org/apache/juli/OneLineFormatter.java 2009-03-10 12:13:21 UTC (rev 950)
@@ -47,7 +47,7 @@
private final SimpleDateFormat monthFormatter = new SimpleDateFormat("MM");
private final SimpleDateFormat yearFormatter = new SimpleDateFormat("yyyy");
private final SimpleDateFormat timeFormatter =
- new SimpleDateFormat("hh:mm:ss");
+ new SimpleDateFormat("HH:mm:ss");
private Date currentDate;
private String currentDateString;
15 years, 6 months
JBossWeb SVN: r949 - branches/2.1.x/conf.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-03-10 08:07:57 -0400 (Tue, 10 Mar 2009)
New Revision: 949
Modified:
branches/2.1.x/conf/web.xml
Log:
- Add xiph mime types, after reading a blog.
Modified: branches/2.1.x/conf/web.xml
===================================================================
--- branches/2.1.x/conf/web.xml 2009-03-10 12:07:51 UTC (rev 948)
+++ branches/2.1.x/conf/web.xml 2009-03-10 12:07:57 UTC (rev 949)
@@ -813,10 +813,6 @@
<mime-type>application/vnd.oasis.opendocument.text</mime-type>
</mime-mapping>
<mime-mapping>
- <extension>ogg</extension>
- <mime-type>application/ogg</mime-type>
- </mime-mapping>
- <mime-mapping>
<!-- OpenDocument Drawing Template -->
<extension>otg </extension>
<mime-type>application/vnd.oasis.opendocument.graphics-template</mime-type>
@@ -841,7 +837,48 @@
<extension>ott</extension>
<mime-type>application/vnd.oasis.opendocument.text-template</mime-type>
</mime-mapping>
+ <!-- xiph mime types -->
<mime-mapping>
+ <extension>ogx</extension>
+ <mime-type>application/ogg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ogv</extension>
+ <mime-type>video/ogg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>oga</extension>
+ <mime-type>audio/ogg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ogg</extension>
+ <mime-type>audio/ogg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>spx</extension>
+ <mime-type>audio/ogg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>flac</extension>
+ <mime-type>audio/flac</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>anx</extension>
+ <mime-type>application/annodex</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>axa</extension>
+ <mime-type>audio/annodex</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>axv</extension>
+ <mime-type>video/annodex</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xspf</extension>
+ <mime-type>application/xspf+xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
<extension>pbm</extension>
<mime-type>image/x-portable-bitmap</mime-type>
</mime-mapping>
15 years, 6 months
JBossWeb SVN: r948 - trunk/conf.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-03-10 08:07:51 -0400 (Tue, 10 Mar 2009)
New Revision: 948
Modified:
trunk/conf/web.xml
Log:
- Add xiph mime types, after reading a blog.
Modified: trunk/conf/web.xml
===================================================================
--- trunk/conf/web.xml 2009-03-10 04:02:22 UTC (rev 947)
+++ trunk/conf/web.xml 2009-03-10 12:07:51 UTC (rev 948)
@@ -813,10 +813,6 @@
<mime-type>application/vnd.oasis.opendocument.text</mime-type>
</mime-mapping>
<mime-mapping>
- <extension>ogg</extension>
- <mime-type>application/ogg</mime-type>
- </mime-mapping>
- <mime-mapping>
<!-- OpenDocument Drawing Template -->
<extension>otg </extension>
<mime-type>application/vnd.oasis.opendocument.graphics-template</mime-type>
@@ -841,7 +837,48 @@
<extension>ott</extension>
<mime-type>application/vnd.oasis.opendocument.text-template</mime-type>
</mime-mapping>
+ <!-- xiph mime types -->
<mime-mapping>
+ <extension>ogx</extension>
+ <mime-type>application/ogg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ogv</extension>
+ <mime-type>video/ogg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>oga</extension>
+ <mime-type>audio/ogg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ogg</extension>
+ <mime-type>audio/ogg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>spx</extension>
+ <mime-type>audio/ogg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>flac</extension>
+ <mime-type>audio/flac</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>anx</extension>
+ <mime-type>application/annodex</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>axa</extension>
+ <mime-type>audio/annodex</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>axv</extension>
+ <mime-type>video/annodex</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xspf</extension>
+ <mime-type>application/xspf+xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
<extension>pbm</extension>
<mime-type>image/x-portable-bitmap</mime-type>
</mime-mapping>
15 years, 6 months
JBossWeb SVN: r947 - in trunk/java: org/apache/catalina/core and 2 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-03-10 00:02:22 -0400 (Tue, 10 Mar 2009)
New Revision: 947
Modified:
trunk/java/javax/servlet/ServletRegistration.java
trunk/java/org/apache/catalina/core/ApplicationContext.java
trunk/java/org/apache/catalina/core/ApplicationContextFacade.java
trunk/java/org/apache/catalina/core/StandardWrapperFacade.java
trunk/java/org/apache/catalina/deploy/SessionCookie.java
trunk/java/org/apache/jasper/servlet/JspCServletContext.java
Log:
- It should build. The API will change again.
Modified: trunk/java/javax/servlet/ServletRegistration.java
===================================================================
--- trunk/java/javax/servlet/ServletRegistration.java 2009-03-09 14:22:08 UTC (rev 946)
+++ trunk/java/javax/servlet/ServletRegistration.java 2009-03-10 04:02:22 UTC (rev 947)
@@ -28,7 +28,7 @@
*/
public interface ServletRegistration {
- boolean setDescription(String description);
+ void setDescription(String description);
void setAsyncSupported(boolean asyncSupported);
Modified: trunk/java/org/apache/catalina/core/ApplicationContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/ApplicationContext.java 2009-03-09 14:22:08 UTC (rev 946)
+++ trunk/java/org/apache/catalina/core/ApplicationContext.java 2009-03-10 04:02:22 UTC (rev 947)
@@ -154,12 +154,6 @@
new ThreadLocal<DispatchData>();
- /**
- * Effective session cookie config.
- */
- private SessionCookieConfig sessionCookieConfig = null;
-
-
// --------------------------------------------------------- Public Methods
@@ -950,22 +944,34 @@
public SessionCookieConfig getSessionCookieConfig() {
- if (sessionCookieConfig != null) {
- return sessionCookieConfig;
- }
- SessionCookie sessionCookie = context.getSessionCookie();
- sessionCookieConfig = new SessionCookieConfig(sessionCookie.getDomain(), sessionCookie.getPath(),
- sessionCookie.getComment(), sessionCookie.isHttpOnly(), sessionCookie.isSecure());
- return sessionCookieConfig;
+ return context.getSessionCookie();
}
public void setSessionCookieConfig(SessionCookieConfig sessionCookieConfig) {
- // FIXME: do something ...
- this.sessionCookieConfig = sessionCookieConfig;
+ SessionCookie sessionCookie = new SessionCookie();
+ sessionCookie.setComment(sessionCookieConfig.getComment());
+ sessionCookie.setDomain(sessionCookieConfig.getDomain());
+ sessionCookie.setHttpOnly(sessionCookieConfig.isHttpOnly());
+ sessionCookie.setSecure(sessionCookieConfig.isSecure());
+ context.setSessionCookie(sessionCookie);
}
+ public ServletRegistration addServlet(String servletName,
+ Class<? extends Servlet> clazz) throws IllegalArgumentException,
+ IllegalStateException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+ public boolean setInitParameter(String name, String value) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+
/**
* @throws IllegalStateException if the context has already been initialised
* @throws IllegalArgumentException TODO SERVLET3 Something to do with SSL
Modified: trunk/java/org/apache/catalina/core/ApplicationContextFacade.java
===================================================================
--- trunk/java/org/apache/catalina/core/ApplicationContextFacade.java 2009-03-09 14:22:08 UTC (rev 946)
+++ trunk/java/org/apache/catalina/core/ApplicationContextFacade.java 2009-03-10 04:02:22 UTC (rev 947)
@@ -394,6 +394,28 @@
}
+ public ServletRegistration addServlet(String servletName,
+ Class<? extends Servlet> clazz) throws IllegalArgumentException,
+ IllegalStateException {
+ if (SecurityUtil.isPackageProtectionEnabled()) {
+ return (ServletRegistration) doPrivileged("addServlet",
+ new Object[]{servletName, clazz});
+ } else {
+ return context.addServlet(servletName, clazz);
+ }
+ }
+
+
+ public boolean setInitParameter(String name, String value) {
+ if (SecurityUtil.isPackageProtectionEnabled()) {
+ return (Boolean) doPrivileged("setInitParameter",
+ new Object[]{name, value});
+ } else {
+ return context.setInitParameter(name, value);
+ }
+ }
+
+
public FilterRegistration findFilterRegistration(String filterName) {
if (SecurityUtil.isPackageProtectionEnabled()) {
return (FilterRegistration) doPrivileged("findFilterRegistration",
Modified: trunk/java/org/apache/catalina/core/StandardWrapperFacade.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardWrapperFacade.java 2009-03-09 14:22:08 UTC (rev 946)
+++ trunk/java/org/apache/catalina/core/StandardWrapperFacade.java 2009-03-10 04:02:22 UTC (rev 947)
@@ -35,8 +35,7 @@
*/
public final class StandardWrapperFacade
- extends ServletRegistration
- implements ServletConfig {
+ implements ServletRegistration, ServletConfig {
// ----------------------------------------------------------- Constructors
@@ -96,45 +95,36 @@
}
- @Override
public void addMapping(String... urlPatterns) {
// TODO Auto-generated method stub
}
- @Override
public void setAsyncSupported(boolean asyncSupported) {
// TODO Auto-generated method stub
- super.setAsyncSupported(asyncSupported);
}
- @Override
public void setDescription(String description) {
// TODO Auto-generated method stub
- super.setDescription(description);
}
- @Override
- public void setInitParameter(String name, String value) {
+ public boolean setInitParameter(String name, String value) {
// TODO Auto-generated method stub
-
+ return false;
}
- @Override
public void setInitParameters(Map<String, String> initParameters) {
// TODO Auto-generated method stub
}
- @Override
public void setLoadOnStartup(int loadOnStartup) {
// TODO Auto-generated method stub
- super.setLoadOnStartup(loadOnStartup);
}
Modified: trunk/java/org/apache/catalina/deploy/SessionCookie.java
===================================================================
--- trunk/java/org/apache/catalina/deploy/SessionCookie.java 2009-03-09 14:22:08 UTC (rev 946)
+++ trunk/java/org/apache/catalina/deploy/SessionCookie.java 2009-03-10 04:02:22 UTC (rev 947)
@@ -19,8 +19,10 @@
import java.io.Serializable;
-public class SessionCookie implements Serializable {
+import javax.servlet.SessionCookieConfig;
+public class SessionCookie implements SessionCookieConfig, Serializable {
+
protected String domain = null;
protected String path = null;
protected String comment = null;
Modified: trunk/java/org/apache/jasper/servlet/JspCServletContext.java
===================================================================
--- trunk/java/org/apache/jasper/servlet/JspCServletContext.java 2009-03-09 14:22:08 UTC (rev 946)
+++ trunk/java/org/apache/jasper/servlet/JspCServletContext.java 2009-03-10 04:02:22 UTC (rev 947)
@@ -454,6 +454,18 @@
}
+ public ServletRegistration addServlet(String servletName,
+ Class<? extends Servlet> clazz) throws IllegalArgumentException,
+ IllegalStateException {
+ return null;
+ }
+
+
+ public boolean setInitParameter(String name, String value) {
+ return false;
+ }
+
+
public FilterRegistration findFilterRegistration(String filterName) {
return null;
}
15 years, 6 months
JBossWeb SVN: r946 - in trunk: java/javax/servlet and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2009-03-09 10:22:08 -0400 (Mon, 09 Mar 2009)
New Revision: 946
Modified:
trunk/PATCHES.txt
trunk/java/javax/servlet/FilterRegistration.java
trunk/java/javax/servlet/ServletContext.java
trunk/java/javax/servlet/ServletRegistration.java
trunk/java/javax/servlet/SessionCookieConfig.java
Log:
- Update API (won't build for now).
- Add one to the dropped patch list.
Modified: trunk/PATCHES.txt
===================================================================
--- trunk/PATCHES.txt 2009-02-25 16:53:27 UTC (rev 945)
+++ trunk/PATCHES.txt 2009-03-09 14:22:08 UTC (rev 946)
@@ -49,3 +49,8 @@
733771
Deprecate some wrapper methods in Servlet API (not accepted yet)
+
+751502
+Per context validation (incomplete, and looks a bit useless anyway)
+
+
Modified: trunk/java/javax/servlet/FilterRegistration.java
===================================================================
--- trunk/java/javax/servlet/FilterRegistration.java 2009-02-25 16:53:27 UTC (rev 945)
+++ trunk/java/javax/servlet/FilterRegistration.java 2009-03-09 14:22:08 UTC (rev 946)
@@ -24,27 +24,20 @@
import java.util.Map;
/**
- * @version $Rev: 743426 $ $Date: 2009-02-11 18:52:39 +0100 (Wed, 11 Feb 2009) $
+ * @version $Rev: 751589 $ $Date: 2009-03-09 06:35:08 +0100 (Mon, 09 Mar 2009) $
* @since 3.0
*/
-public abstract class FilterRegistration {
- protected String description;
- protected boolean isAsyncSupported;
+public interface FilterRegistration {
+ boolean setDescription(String description);
- public void setDescription(String description) {
- this.description = description;
- }
+ void setAsyncSupported(boolean asyncSupported);
- public void setAsyncSupported(boolean asyncSupported) {
- isAsyncSupported = asyncSupported;
- }
+ void addMappingForServletNames(EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, String ... servletNames);
- public abstract void addMappingForServletNames(EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, String ... servletNames);
+ void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, String ... urlPatterns);
- public abstract void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, String ... urlPatterns);
+ boolean setInitParameter(String name, String value);
- public abstract void setInitParameter(String name, String value);
+ void setInitParameters(Map<String, String> initParameters);
- public abstract void setInitParameters(Map<String, String> initParameters);
-
}
Modified: trunk/java/javax/servlet/ServletContext.java
===================================================================
--- trunk/java/javax/servlet/ServletContext.java 2009-02-25 16:53:27 UTC (rev 945)
+++ trunk/java/javax/servlet/ServletContext.java 2009-03-09 14:22:08 UTC (rev 946)
@@ -661,6 +661,19 @@
String className) throws IllegalArgumentException, IllegalStateException;
/**
+ * Add the specified servlet to the context
+ * @param servletName servlet's name
+ * @param clazz class of the servlet
+ * @throws IllegalArgumentException duplicate servletName
+ * @throws IllegalStateException this method called after #initialize
+ * @return ServletRegistration allowing configuration of the servlet
+ *
+ * @since 3.0
+ */
+ ServletRegistration addServlet(String servletName,
+ Class<? extends Servlet> clazz) throws IllegalArgumentException, IllegalStateException;
+
+ /**
* Fish out the servlet registration for a named servlet
* @param servletName name of the servlet you want to configure
* @return ServletRegistration for servlet you want
@@ -731,7 +744,14 @@
*/
EnumSet<SessionTrackingMode> getEffectiveSessionTrackingModes();
-
+ /**
+ *
+ * @param name of the init parameter to set
+ * @param value new value
+ * @return whether it was set??
+ * @since 3.0
+ */
+ boolean setInitParameter(String name, String value);
}
Modified: trunk/java/javax/servlet/ServletRegistration.java
===================================================================
--- trunk/java/javax/servlet/ServletRegistration.java 2009-02-25 16:53:27 UTC (rev 945)
+++ trunk/java/javax/servlet/ServletRegistration.java 2009-03-09 14:22:08 UTC (rev 946)
@@ -23,31 +23,21 @@
import java.util.Map;
/**
- * @version $Rev: 743426 $ $Date: 2009-02-11 18:52:39 +0100 (Wed, 11 Feb 2009) $
+ * @version $Rev: 751589 $ $Date: 2009-03-09 06:35:08 +0100 (Mon, 09 Mar 2009) $
* @since 3.0
*/
-public abstract class ServletRegistration {
+public interface ServletRegistration {
- protected String description;
- protected boolean isAsyncSupported;
- protected int loadOnStartup;
+ boolean setDescription(String description);
- public void setDescription(String description) {
- this.description = description;
- }
+ void setAsyncSupported(boolean asyncSupported);
- public void setAsyncSupported(boolean asyncSupported) {
- isAsyncSupported = asyncSupported;
- }
+ void setLoadOnStartup(int loadOnStartup);
- public void setLoadOnStartup(int loadOnStartup) {
- this.loadOnStartup = loadOnStartup;
- }
+ void addMapping(String... urlPatterns);
- public abstract void addMapping(String... urlPatterns);
+ boolean setInitParameter(String name, String value);
- public abstract void setInitParameter(String name, String value);
+ void setInitParameters(Map<String, String> initParameters);
- public abstract void setInitParameters(Map<String, String> initParameters);
-
}
Modified: trunk/java/javax/servlet/SessionCookieConfig.java
===================================================================
--- trunk/java/javax/servlet/SessionCookieConfig.java 2009-02-25 16:53:27 UTC (rev 945)
+++ trunk/java/javax/servlet/SessionCookieConfig.java 2009-03-09 14:22:08 UTC (rev 946)
@@ -21,42 +21,18 @@
package javax.servlet;
/**
- * @version $Rev: 675701 $ $Date: 2008-07-10 21:49:52 +0200 (Thu, 10 Jul 2008) $
+ * @version $Rev: 751589 $ $Date: 2009-03-09 06:35:08 +0100 (Mon, 09 Mar 2009) $
* @since 3.0
*/
-public class SessionCookieConfig {
+public interface SessionCookieConfig {
- private final String domain;
- private final String path;
- private final String comment;
- private final boolean httpOnly;
- private final boolean secure;
+ String getDomain();
- public SessionCookieConfig(String domain, String path, String comment, boolean httpOnly, boolean secure) {
- this.domain = domain;
- this.path = path;
- this.comment = comment;
- this.httpOnly = httpOnly;
- this.secure = secure;
- }
+ String getPath();
- public String getDomain() {
- return domain;
- }
+ String getComment();
- public String getPath() {
- return path;
- }
+ boolean isHttpOnly();
- public String getComment() {
- return comment;
- }
-
- public boolean isHttpOnly() {
- return httpOnly;
- }
-
- public boolean isSecure() {
- return secure;
- }
+ boolean isSecure();
}
15 years, 6 months