JBossWeb SVN: r383 - in trunk: java/org/apache/catalina/core and 2 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-12-23 16:53:10 -0500 (Sun, 23 Dec 2007)
New Revision: 383
Modified:
trunk/java/org/apache/catalina/connector/Response.java
trunk/java/org/apache/catalina/core/ApplicationContext.java
trunk/webapps/docs/changelog.xml
trunk/webapps/docs/config/context.xml
Log:
- Two minor Tomcat patches: improve reset of response, and getResourceAsStream needs a leading slash.
Modified: trunk/java/org/apache/catalina/connector/Response.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Response.java 2007-12-21 16:34:59 UTC (rev 382)
+++ trunk/java/org/apache/catalina/connector/Response.java 2007-12-23 21:53:10 UTC (rev 383)
@@ -665,6 +665,9 @@
coyoteResponse.reset();
outputBuffer.reset();
+ usingOutputStream = false;
+ usingWriter = false;
+ isCharacterEncodingSet = false;
}
Modified: trunk/java/org/apache/catalina/core/ApplicationContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/ApplicationContext.java 2007-12-21 16:34:59 UTC (rev 382)
+++ trunk/java/org/apache/catalina/core/ApplicationContext.java 2007-12-23 21:53:10 UTC (rev 383)
@@ -507,7 +507,7 @@
public InputStream getResourceAsStream(String path) {
path = normalize(path);
- if (path == null)
+ if (path == null || !path.startsWith("/"))
return (null);
DirContext resources = context.getResources();
@@ -865,7 +865,7 @@
String normalized = path;
- // Normalize the slashes and add leading slash if necessary
+ // Normalize the slashes
if (normalized.indexOf('\\') >= 0)
normalized = normalized.replace('\\', '/');
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2007-12-21 16:34:59 UTC (rev 382)
+++ trunk/webapps/docs/changelog.xml 2007-12-23 21:53:10 UTC (rev 383)
@@ -111,6 +111,15 @@
Fix possible race condtion when a webapp classloader has external class
repositories defined. (remm)
</fix>
+ <fix>
+ <bug>43236</bug>: When resetting the response, also reset the flags
+ associated with using a writer or an output stream to allow the user to
+ change character set after the reset. (markt)
+ </fix>
+ <fix>
+ <bug>43241</bug>: Make ServletContext.getResourceAsStream() conform to
+ the specification. Patch provided by John Kew. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
Modified: trunk/webapps/docs/config/context.xml
===================================================================
--- trunk/webapps/docs/config/context.xml 2007-12-21 16:34:59 UTC (rev 382)
+++ trunk/webapps/docs/config/context.xml 2007-12-23 21:53:10 UTC (rev 383)
@@ -162,7 +162,12 @@
<attribute name="privileged" required="false">
<p>Set to <code>true</code> to allow this context to use container
- servlets, like the manager servlet.</p>
+ servlets, like the manager servlet. Use of the <code>privileged</code>
+ attribute will change the context's parent class loader to be the
+ <em>Server</em> class loader rather than the <em>Shared</em> class
+ loader. Note that in a default installation, the <em>Common</em> class
+ loader is used for both the <em>Server</em> and the <em>Shared</em>
+ class loaders.</p>
</attribute>
<attribute name="path" required="false">
17 years
JBossWeb SVN: r381 - in trunk: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-12-19 09:27:09 -0500 (Wed, 19 Dec 2007)
New Revision: 381
Modified:
trunk/java/org/apache/catalina/loader/WebappClassLoader.java
trunk/webapps/docs/changelog.xml
Log:
- Port CL fix when using an external repository.
Modified: trunk/java/org/apache/catalina/loader/WebappClassLoader.java
===================================================================
--- trunk/java/org/apache/catalina/loader/WebappClassLoader.java 2007-12-13 21:50:12 UTC (rev 380)
+++ trunk/java/org/apache/catalina/loader/WebappClassLoader.java 2007-12-19 14:27:09 UTC (rev 381)
@@ -883,7 +883,9 @@
}
if ((clazz == null) && hasExternalRepositories) {
try {
- clazz = super.findClass(name);
+ synchronized (this) {
+ clazz = super.findClass(name);
+ }
} catch(AccessControlException ace) {
throw new ClassNotFoundException(name, ace);
} catch (RuntimeException e) {
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2007-12-13 21:50:12 UTC (rev 380)
+++ trunk/webapps/docs/changelog.xml 2007-12-19 14:27:09 UTC (rev 381)
@@ -107,6 +107,10 @@
<fix>
Fix IOException handling when parsing post parameters. (remm)
</fix>
+ <fix>
+ Fix possible race condtion when a webapp classloader has external class
+ repositories defined. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
17 years
JBossWeb SVN: r380 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-12-13 16:50:12 -0500 (Thu, 13 Dec 2007)
New Revision: 380
Added:
tags/JBOSSWEB_2_1_0_CR11/
Log:
- JBoss Web 2.1.0 CR11.
Copied: tags/JBOSSWEB_2_1_0_CR11 (from rev 379, trunk)
17 years
JBossWeb SVN: r379 - tags/JBOSSWEB_2_0_0_GA_CP05.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-12-11 08:54:12 -0500 (Tue, 11 Dec 2007)
New Revision: 379
Added:
tags/JBOSSWEB_2_0_0_GA_CP05/build.properties
Log:
- Add a build.properties file for CP05.
Added: tags/JBOSSWEB_2_0_0_GA_CP05/build.properties
===================================================================
--- tags/JBOSSWEB_2_0_0_GA_CP05/build.properties (rev 0)
+++ tags/JBOSSWEB_2_0_0_GA_CP05/build.properties 2007-12-11 13:54:12 UTC (rev 379)
@@ -0,0 +1,5 @@
+# ----- Vesion Control Flags -----
+version.major=2
+version.minor=0
+version.build=0
+version.patch=GA_CP05
Property changes on: tags/JBOSSWEB_2_0_0_GA_CP05/build.properties
___________________________________________________________________
Name: svn:eol-style
+ native
17 years
JBossWeb SVN: r378 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-12-11 08:49:55 -0500 (Tue, 11 Dec 2007)
New Revision: 378
Added:
tags/JBOSSWEB_2_0_0_GA_CP05/
Log:
- JBoss Web 2.0.0 GA CP 05.
Copied: tags/JBOSSWEB_2_0_0_GA_CP05 (from rev 377, branches/JBOSSWEB_2_0_0_GA_CP)
17 years
JBossWeb SVN: r377 - trunk/java/javax/el.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-12-07 12:39:11 -0500 (Fri, 07 Dec 2007)
New Revision: 377
Modified:
trunk/java/javax/el/BeanELResolver.java
trunk/java/javax/el/ResourceBundleELResolver.java
Log:
- Forgotten API fixes.
Modified: trunk/java/javax/el/BeanELResolver.java
===================================================================
--- trunk/java/javax/el/BeanELResolver.java 2007-12-07 16:46:44 UTC (rev 376)
+++ trunk/java/javax/el/BeanELResolver.java 2007-12-07 17:39:11 UTC (rev 377)
@@ -34,299 +34,311 @@
public class BeanELResolver extends ELResolver {
- private final boolean readOnly;
+ private final boolean readOnly;
- private final ConcurrentCache<String, BeanProperties> cache = new ConcurrentCache<String, BeanProperties>(
- 1000);
+ private final ConcurrentCache<String, BeanProperties> cache = new ConcurrentCache<String, BeanProperties>(
+ 1000);
- public BeanELResolver() {
- this.readOnly = false;
- }
+ public BeanELResolver() {
+ this.readOnly = false;
+ }
- public BeanELResolver(boolean readOnly) {
- this.readOnly = readOnly;
- }
+ public BeanELResolver(boolean readOnly) {
+ this.readOnly = readOnly;
+ }
- public Object getValue(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
- if (base == null || property == null) {
- return null;
- }
+ public Object getValue(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ if (base == null || property == null) {
+ return null;
+ }
- context.setPropertyResolved(true);
- Method m = this.property(context, base, property).read(context);
- try {
- return m.invoke(base, (Object[]) null);
- } catch (IllegalAccessException e) {
- throw new ELException(e);
- } catch (InvocationTargetException e) {
- throw new ELException(message(context, "propertyReadError",
- new Object[] { base.getClass().getName(),
- property.toString() }), e.getCause());
- } catch (Exception e) {
- throw new ELException(e);
- }
- }
+ context.setPropertyResolved(true);
+ Method m = this.property(context, base, property).read(context);
+ try {
+ return m.invoke(base, (Object[]) null);
+ } catch (IllegalAccessException e) {
+ throw new ELException(e);
+ } catch (InvocationTargetException e) {
+ throw new ELException(message(context, "propertyReadError",
+ new Object[] { base.getClass().getName(),
+ property.toString() }), e.getCause());
+ } catch (Exception e) {
+ throw new ELException(e);
+ }
+ }
- public Class<?> getType(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
- if (base == null || property == null) {
- return null;
- }
+ public Class<?> getType(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ if (base == null || property == null) {
+ return null;
+ }
- context.setPropertyResolved(true);
- return this.property(context, base, property).getType();
- }
+ context.setPropertyResolved(true);
+ return this.property(context, base, property).getPropertyType();
+ }
- public void setValue(ELContext context, Object base, Object property,
- Object value) throws NullPointerException,
- PropertyNotFoundException, PropertyNotWritableException,
- ELException {
- if (context == null) {
- throw new NullPointerException();
- }
- if (base == null || property == null) {
- return;
- }
+ public void setValue(ELContext context, Object base, Object property,
+ Object value) throws NullPointerException,
+ PropertyNotFoundException, PropertyNotWritableException,
+ ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ if (base == null || property == null) {
+ return;
+ }
- context.setPropertyResolved(true);
+ context.setPropertyResolved(true);
- if (this.readOnly) {
- throw new PropertyNotWritableException(message(context,
- "resolverNotWriteable", new Object[] { base.getClass()
- .getName() }));
- }
+ if (this.readOnly) {
+ throw new PropertyNotWritableException(message(context,
+ "resolverNotWriteable", new Object[] { base.getClass()
+ .getName() }));
+ }
- Method m = this.property(context, base, property).write(context);
- try {
- m.invoke(base, new Object[] { value });
- } catch (IllegalAccessException e) {
- throw new ELException(e);
- } catch (InvocationTargetException e) {
- throw new ELException(message(context, "propertyWriteError",
- new Object[] { base.getClass().getName(),
- property.toString() }), e.getCause());
- } catch (Exception e) {
- throw new ELException(e);
- }
- }
+ Method m = this.property(context, base, property).write(context);
+ try {
+ m.invoke(base, value);
+ } catch (IllegalAccessException e) {
+ throw new ELException(e);
+ } catch (InvocationTargetException e) {
+ throw new ELException(message(context, "propertyWriteError",
+ new Object[] { base.getClass().getName(),
+ property.toString() }), e.getCause());
+ } catch (Exception e) {
+ throw new ELException(e);
+ }
+ }
- public boolean isReadOnly(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
- if (base == null || property == null) {
- return false;
- }
+ public boolean isReadOnly(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ if (base == null || property == null) {
+ return false;
+ }
- context.setPropertyResolved(true);
- return this.readOnly
- || this.property(context, base, property).isReadOnly();
- }
+ context.setPropertyResolved(true);
+ return this.readOnly
+ || this.property(context, base, property).isReadOnly();
+ }
- public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
- if (context == null) {
- throw new NullPointerException();
- }
+ public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
+ if (context == null) {
+ throw new NullPointerException();
+ }
- if (base == null) {
- return null;
- }
+ if (base == null) {
+ return null;
+ }
- try {
- BeanInfo info = Introspector.getBeanInfo(base.getClass());
- PropertyDescriptor[] pds = info.getPropertyDescriptors();
- for (int i = 0; i < pds.length; i++) {
- pds[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
- pds[i].setValue(TYPE, pds[i].getPropertyType());
- }
- return Arrays.asList((FeatureDescriptor[]) pds).iterator();
- } catch (IntrospectionException e) {
- //
- }
+ try {
+ BeanInfo info = Introspector.getBeanInfo(base.getClass());
+ PropertyDescriptor[] pds = info.getPropertyDescriptors();
+ for (int i = 0; i < pds.length; i++) {
+ pds[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
+ pds[i].setValue(TYPE, pds[i].getPropertyType());
+ }
+ return Arrays.asList((FeatureDescriptor[]) pds).iterator();
+ } catch (IntrospectionException e) {
+ //
+ }
- return null;
- }
+ return null;
+ }
- public Class<?> getCommonPropertyType(ELContext context, Object base) {
- if (context == null) {
- throw new NullPointerException();
- }
+ public Class<?> getCommonPropertyType(ELContext context, Object base) {
+ if (context == null) {
+ throw new NullPointerException();
+ }
- if (base != null) {
- return Object.class;
- }
+ if (base != null) {
+ return Object.class;
+ }
- return null;
- }
+ return null;
+ }
- protected final static class BeanProperties {
- private final Map<String, BeanProperty> properties;
+ protected final static class BeanProperties {
+ private final Map<String, BeanProperty> properties;
- private final Class<?> type;
+ private final Class<?> type;
- public BeanProperties(Class<?> type) throws ELException {
- this.type = type;
- this.properties = new HashMap<String, BeanProperty>();
- try {
- BeanInfo info = Introspector.getBeanInfo(this.type);
- PropertyDescriptor[] pds = info.getPropertyDescriptors();
- for (int i = 0; i < pds.length; i++) {
- this.properties.put(pds[i].getName(), new BeanProperty(
- type, pds[i]));
- }
- } catch (IntrospectionException ie) {
- throw new ELException(ie);
- }
- }
+ public BeanProperties(Class<?> type) throws ELException {
+ this.type = type;
+ this.properties = new HashMap<String, BeanProperty>();
+ try {
+ BeanInfo info = Introspector.getBeanInfo(this.type);
+ PropertyDescriptor[] pds = info.getPropertyDescriptors();
+ for (int i = 0; i < pds.length; i++) {
+ this.properties.put(pds[i].getName(), new BeanProperty(
+ type, pds[i]));
+ }
+ } catch (IntrospectionException ie) {
+ throw new ELException(ie);
+ }
+ }
- public BeanProperty get(ELContext ctx, String name) {
- BeanProperty property = this.properties.get(name);
- if (property == null) {
- throw new PropertyNotFoundException(message(ctx,
- "propertyNotFound",
- new Object[] { type.getName(), name }));
- }
- return property;
- }
+ private BeanProperty get(ELContext ctx, String name) {
+ BeanProperty property = this.properties.get(name);
+ if (property == null) {
+ throw new PropertyNotFoundException(message(ctx,
+ "propertyNotFound",
+ new Object[] { type.getName(), name }));
+ }
+ return property;
+ }
+
+ public BeanProperty getBeanProperty(String name) {
+ return get(null, name);
+ }
- public Class<?> getType() {
+ private Class<?> getType() {
return type;
}
- }
+ }
protected final static class BeanProperty {
- private final Class type;
+ private final Class type;
- private final Class owner;
+ private final Class owner;
- private final PropertyDescriptor descriptor;
+ private final PropertyDescriptor descriptor;
- private Method read;
+ private Method read;
- private Method write;
+ private Method write;
- public BeanProperty(Class owner, PropertyDescriptor descriptor) {
- this.owner = owner;
- this.descriptor = descriptor;
- this.type = descriptor.getPropertyType();
- }
+ public BeanProperty(Class<?> owner, PropertyDescriptor descriptor) {
+ this.owner = owner;
+ this.descriptor = descriptor;
+ this.type = descriptor.getPropertyType();
+ }
- public Class<?> getType() {
- return this.type;
- }
+ public Class getPropertyType() {
+ return this.type;
+ }
- public boolean isReadOnly() {
- return this.write == null
- && (null == (this.write = getMethod(this.owner, descriptor.getWriteMethod())));
- }
+ public boolean isReadOnly() {
+ return this.write == null
+ && (null == (this.write = getMethod(this.owner, descriptor.getWriteMethod())));
+ }
- public Method write(ELContext ctx) {
- if (this.write == null) {
- this.write = getMethod(this.owner, descriptor.getWriteMethod());
- if (this.write == null) {
- throw new PropertyNotFoundException(message(ctx,
- "propertyNotWritable", new Object[] {
- type.getName(), descriptor.getName() }));
- }
- }
- return this.write;
- }
+ public Method getWriteMethod() {
+ return write(null);
+ }
- public Method read(ELContext ctx) {
- if (this.read == null) {
- this.read = getMethod(this.owner, descriptor.getReadMethod());
- if (this.read == null) {
- throw new PropertyNotFoundException(message(ctx,
- "propertyNotReadable", new Object[] {
- type.getName(), descriptor.getName() }));
- }
- }
- return this.read;
- }
- }
+ public Method getReadMethod() {
+ return this.read(null);
+ }
- private final BeanProperty property(ELContext ctx, Object base,
- Object property) {
- Class<?> type = base.getClass();
- String prop = property.toString();
+ private Method write(ELContext ctx) {
+ if (this.write == null) {
+ this.write = getMethod(this.owner, descriptor.getWriteMethod());
+ if (this.write == null) {
+ throw new PropertyNotFoundException(message(ctx,
+ "propertyNotWritable", new Object[] {
+ type.getName(), descriptor.getName() }));
+ }
+ }
+ return this.write;
+ }
- BeanProperties props = this.cache.get(type.getName());
- if (props == null || type != props.getType()) {
- props = new BeanProperties(type);
- this.cache.put(type.getName(), props);
- }
+ private Method read(ELContext ctx) {
+ if (this.read == null) {
+ this.read = getMethod(this.owner, descriptor.getReadMethod());
+ if (this.read == null) {
+ throw new PropertyNotFoundException(message(ctx,
+ "propertyNotReadable", new Object[] {
+ type.getName(), descriptor.getName() }));
+ }
+ }
+ return this.read;
+ }
+ }
- return props.get(ctx, prop);
- }
+ private final BeanProperty property(ELContext ctx, Object base,
+ Object property) {
+ Class<?> type = base.getClass();
+ String prop = property.toString();
- private final static Method getMethod(Class type, Method m) {
- if (m == null || Modifier.isPublic(type.getModifiers())) {
- return m;
- }
- Class[] inf = type.getInterfaces();
- Method mp = null;
- for (int i = 0; i < inf.length; i++) {
- try {
- mp = inf[i].getMethod(m.getName(), (Class[]) m.getParameterTypes());
- mp = getMethod(mp.getDeclaringClass(), mp);
- if (mp != null) {
- return mp;
- }
- } catch (NoSuchMethodException e) {
- }
- }
- Class sup = type.getSuperclass();
- if (sup != null) {
- try {
- mp = sup.getMethod(m.getName(), (Class[]) m.getParameterTypes());
- mp = getMethod(mp.getDeclaringClass(), mp);
- if (mp != null) {
- return mp;
- }
- } catch (NoSuchMethodException e) {
- }
- }
- return null;
- }
-
- private final static class ConcurrentCache<K,V> {
+ BeanProperties props = this.cache.get(type.getName());
+ if (props == null || type != props.getType()) {
+ props = new BeanProperties(type);
+ this.cache.put(type.getName(), props);
+ }
- private final int size;
- private final Map<K,V> eden;
- private final Map<K,V> longterm;
-
- public ConcurrentCache(int size) {
- this.size = size;
- this.eden = new ConcurrentHashMap<K,V>(size);
- this.longterm = new WeakHashMap<K,V>(size);
- }
-
- public V get(K key) {
- V value = this.eden.get(key);
- if (value == null) {
- value = this.longterm.get(key);
- if (value != null) {
- this.eden.put(key, value);
- }
- }
- return value;
- }
-
- public void put(K key, V value) {
- if (this.eden.size() >= this.size) {
- this.longterm.putAll(this.eden);
- this.eden.clear();
- }
- this.eden.put(key, value);
- }
+ return props.get(ctx, prop);
+ }
- }
+ private final static Method getMethod(Class type, Method m) {
+ if (m == null || Modifier.isPublic(type.getModifiers())) {
+ return m;
+ }
+ Class[] inf = type.getInterfaces();
+ Method mp = null;
+ for (int i = 0; i < inf.length; i++) {
+ try {
+ mp = inf[i].getMethod(m.getName(), (Class[]) m.getParameterTypes());
+ mp = getMethod(mp.getDeclaringClass(), mp);
+ if (mp != null) {
+ return mp;
+ }
+ } catch (NoSuchMethodException e) {
+ }
+ }
+ Class sup = type.getSuperclass();
+ if (sup != null) {
+ try {
+ mp = sup.getMethod(m.getName(), (Class[]) m.getParameterTypes());
+ mp = getMethod(mp.getDeclaringClass(), mp);
+ if (mp != null) {
+ return mp;
+ }
+ } catch (NoSuchMethodException e) {
+ }
+ }
+ return null;
+ }
+
+ private final static class ConcurrentCache<K,V> {
+
+ private final int size;
+ private final Map<K,V> eden;
+ private final Map<K,V> longterm;
+
+ public ConcurrentCache(int size) {
+ this.size = size;
+ this.eden = new ConcurrentHashMap<K,V>(size);
+ this.longterm = new WeakHashMap<K,V>(size);
+ }
+
+ public V get(K key) {
+ V value = this.eden.get(key);
+ if (value == null) {
+ value = this.longterm.get(key);
+ if (value != null) {
+ this.eden.put(key, value);
+ }
+ }
+ return value;
+ }
+
+ public void put(K key, V value) {
+ if (this.eden.size() >= this.size) {
+ this.longterm.putAll(this.eden);
+ this.eden.clear();
+ }
+ this.eden.put(key, value);
+ }
+
+ }
}
Modified: trunk/java/javax/el/ResourceBundleELResolver.java
===================================================================
--- trunk/java/javax/el/ResourceBundleELResolver.java 2007-12-07 16:46:44 UTC (rev 376)
+++ trunk/java/javax/el/ResourceBundleELResolver.java 2007-12-07 17:39:11 UTC (rev 377)
@@ -27,102 +27,102 @@
public class ResourceBundleELResolver extends ELResolver {
- public ResourceBundleELResolver() {
- super();
- }
+ public ResourceBundleELResolver() {
+ super();
+ }
- public Object getValue(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof ResourceBundle) {
- context.setPropertyResolved(true);
+ public Object getValue(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof ResourceBundle) {
+ context.setPropertyResolved(true);
- if (property != null) {
- try {
- return ((ResourceBundle) base).getObject(property
- .toString());
- } catch (MissingResourceException mre) {
- return "???" + property.toString() + "???";
- }
- }
- }
+ if (property != null) {
+ try {
+ return ((ResourceBundle) base).getObject(property
+ .toString());
+ } catch (MissingResourceException mre) {
+ return "???" + property.toString() + "???";
+ }
+ }
+ }
- return null;
- }
+ return null;
+ }
- public Class<?> getType(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof ResourceBundle) {
- context.setPropertyResolved(true);
- }
-
- return null;
- }
+ public Class<?> getType(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof ResourceBundle) {
+ context.setPropertyResolved(true);
+ }
+
+ return null;
+ }
- public void setValue(ELContext context, Object base, Object property,
- Object value) throws NullPointerException,
- PropertyNotFoundException, PropertyNotWritableException,
- ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof ResourceBundle) {
- context.setPropertyResolved(true);
- throw new PropertyNotWritableException(message(context,
- "resolverNotWriteable", new Object[] { base.getClass()
- .getName() }));
- }
- }
+ public void setValue(ELContext context, Object base, Object property,
+ Object value) throws NullPointerException,
+ PropertyNotFoundException, PropertyNotWritableException,
+ ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof ResourceBundle) {
+ context.setPropertyResolved(true);
+ throw new PropertyNotWritableException(message(context,
+ "resolverNotWriteable", new Object[] { base.getClass()
+ .getName() }));
+ }
+ }
- public boolean isReadOnly(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof ResourceBundle) {
- context.setPropertyResolved(true);
- }
-
- return true;
- }
+ public boolean isReadOnly(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof ResourceBundle) {
+ context.setPropertyResolved(true);
+ }
+
+ return true;
+ }
- public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
- if (base instanceof ResourceBundle) {
- List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();
- Enumeration e = ((ResourceBundle) base).getKeys();
- FeatureDescriptor feat;
- String key;
- while (e.hasMoreElements()) {
- key = (String) e.nextElement();
- feat = new FeatureDescriptor();
- feat.setDisplayName(key);
- feat.setExpert(false);
- feat.setHidden(false);
- feat.setName(key);
- feat.setPreferred(true);
- feat.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
- feat.setValue(TYPE, String.class);
- feats.add(feat);
- }
- return feats.iterator();
- }
- return null;
- }
+ public Iterator getFeatureDescriptors(ELContext context, Object base) {
+ if (base instanceof ResourceBundle) {
+ List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();
+ Enumeration e = ((ResourceBundle) base).getKeys();
+ FeatureDescriptor feat;
+ String key;
+ while (e.hasMoreElements()) {
+ key = (String) e.nextElement();
+ feat = new FeatureDescriptor();
+ feat.setDisplayName(key);
+ feat.setExpert(false);
+ feat.setHidden(false);
+ feat.setName(key);
+ feat.setPreferred(true);
+ feat.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
+ feat.setValue(TYPE, String.class);
+ feats.add(feat);
+ }
+ return feats.iterator();
+ }
+ return null;
+ }
- public Class<?> getCommonPropertyType(ELContext context, Object base) {
- if (base instanceof ResourceBundle) {
- return String.class;
- }
- return null;
- }
+ public Class<?> getCommonPropertyType(ELContext context, Object base) {
+ if (base instanceof ResourceBundle) {
+ return String.class;
+ }
+ return null;
+ }
}
17 years
JBossWeb SVN: r376 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-12-07 11:46:44 -0500 (Fri, 07 Dec 2007)
New Revision: 376
Added:
tags/JBOSSWEB_2_1_0_CR10/
Log:
- JBoss Web 2.1.0 CR10.
Copied: tags/JBOSSWEB_2_1_0_CR10 (from rev 375, trunk)
17 years
JBossWeb SVN: r375 - in trunk/java/javax/servlet/jsp: tagext and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-12-07 11:31:32 -0500 (Fri, 07 Dec 2007)
New Revision: 375
Modified:
trunk/java/javax/servlet/jsp/el/ScopedAttributeELResolver.java
trunk/java/javax/servlet/jsp/tagext/TagInfo.java
Log:
- Forgotten API fixes.
Modified: trunk/java/javax/servlet/jsp/el/ScopedAttributeELResolver.java
===================================================================
--- trunk/java/javax/servlet/jsp/el/ScopedAttributeELResolver.java 2007-12-07 15:14:27 UTC (rev 374)
+++ trunk/java/javax/servlet/jsp/el/ScopedAttributeELResolver.java 2007-12-07 16:31:32 UTC (rev 375)
@@ -57,7 +57,7 @@
return null;
}
- public Class getType(ELContext context, Object base, Object property)
+ public Class<Object> getType(ELContext context, Object base, Object property)
throws NullPointerException, PropertyNotFoundException, ELException {
if (context == null) {
throw new NullPointerException();
Modified: trunk/java/javax/servlet/jsp/tagext/TagInfo.java
===================================================================
--- trunk/java/javax/servlet/jsp/tagext/TagInfo.java 2007-12-07 15:14:27 UTC (rev 374)
+++ trunk/java/javax/servlet/jsp/tagext/TagInfo.java 2007-12-07 16:31:32 UTC (rev 375)
@@ -38,21 +38,21 @@
* Static constant for getBodyContent() when it is Tag dependent.
*/
- public static final String BODY_CONTENT_TAG_DEPENDENT = "TAGDEPENDENT";
+ public static final String BODY_CONTENT_TAG_DEPENDENT = "tagdependent";
/**
* Static constant for getBodyContent() when it is empty.
*/
- public static final String BODY_CONTENT_EMPTY = "EMPTY";
+ public static final String BODY_CONTENT_EMPTY = "empty";
/**
* Static constant for getBodyContent() when it is scriptless.
*
* @since 2.0
*/
- public static final String BODY_CONTENT_SCRIPTLESS = "SCRIPTLESS";
+ public static final String BODY_CONTENT_SCRIPTLESS = "scriptless";
/**
* Constructor for TagInfo from data in the JSP 1.1 format for TLD.
17 years
JBossWeb SVN: r374 - in branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache: tomcat/jni and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2007-12-07 10:14:27 -0500 (Fri, 07 Dec 2007)
New Revision: 374
Modified:
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/jni/SSL.java
Log:
Don't load the entropy but sets the file the entropy is collected from.
See http://jira.jboss.com/jira/browse/JBNATIVE-51
Modified: branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java
===================================================================
--- branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java 2007-12-07 15:05:56 UTC (rev 373)
+++ branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java 2007-12-07 15:14:27 UTC (rev 374)
@@ -205,17 +205,17 @@
//only once per VM
return;
}
- String methodName = "initialize";
+ String methodName = "randSet";
Class paramTypes[] = new Class[1];
paramTypes[0] = String.class;
Object paramValues[] = new Object[1];
- paramValues[0] = "on".equalsIgnoreCase(SSLEngine)?null:SSLEngine;
+ paramValues[0] = SSLRandomSeed;
Class clazz = Class.forName("org.apache.tomcat.jni.SSL");
Method method = clazz.getMethod(methodName, paramTypes);
method.invoke(null, paramValues);
- methodName = "randLoad";
- paramValues[0] = SSLRandomSeed;
+ methodName = "initialize";
+ paramValues[0] = "on".equalsIgnoreCase(SSLEngine)?null:SSLEngine;
method = clazz.getMethod(methodName, paramTypes);
method.invoke(null, paramValues);
Modified: branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/jni/SSL.java
===================================================================
--- branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/jni/SSL.java 2007-12-07 15:05:56 UTC (rev 373)
+++ branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/jni/SSL.java 2007-12-07 15:14:27 UTC (rev 374)
@@ -227,6 +227,12 @@
public static native int initialize(String engine);
/**
+ * Set source of entropy to use in SSL
+ * @param filename Filename containing random data
+ */
+ public static native boolean randSet(String filename);
+
+ /**
* Add content of the file to the PRNG
* @param filename Filename containing random data.
* If null the default file will be tested.
17 years
JBossWeb SVN: r373 - in branches/2.0.x/src/share/classes/org/apache: tomcat/jni and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2007-12-07 10:05:56 -0500 (Fri, 07 Dec 2007)
New Revision: 373
Modified:
branches/2.0.x/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java
branches/2.0.x/src/share/classes/org/apache/tomcat/jni/SSL.java
Log:
Don't load the entropy but sets the file the entropy is collected from.
Modified: branches/2.0.x/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java 2007-12-07 15:04:29 UTC (rev 372)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java 2007-12-07 15:05:56 UTC (rev 373)
@@ -204,17 +204,17 @@
//only once per VM
return;
}
- String methodName = "initialize";
+ String methodName = "randSet";
Class paramTypes[] = new Class[1];
paramTypes[0] = String.class;
Object paramValues[] = new Object[1];
- paramValues[0] = "on".equalsIgnoreCase(SSLEngine)?null:SSLEngine;
+ paramValues[0] = SSLRandomSeed;
Class clazz = Class.forName("org.apache.tomcat.jni.SSL");
Method method = clazz.getMethod(methodName, paramTypes);
method.invoke(null, paramValues);
- methodName = "randLoad";
- paramValues[0] = SSLRandomSeed;
+ methodName = "initialize";
+ paramValues[0] = "on".equalsIgnoreCase(SSLEngine)?null:SSLEngine;
method = clazz.getMethod(methodName, paramTypes);
method.invoke(null, paramValues);
Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/jni/SSL.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/jni/SSL.java 2007-12-07 15:04:29 UTC (rev 372)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/jni/SSL.java 2007-12-07 15:05:56 UTC (rev 373)
@@ -227,6 +227,12 @@
public static native int initialize(String engine);
/**
+ * Set source of entropy to use in SSL
+ * @param filename Filename containing random data
+ */
+ public static native boolean randSet(String filename);
+
+ /**
* Add content of the file to the PRNG
* @param filename Filename containing random data.
* If null the default file will be tested.
17 years