tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r426537 - in /tomcat/tc6.0.x/trunk: ./ java/javax/el/ java/javax/servlet/jsp/ java/javax/servlet/jsp/el/ java/javax/servlet/jsp/tagext/ java/org/apache/jasper/compiler/ java/org/apache/jasper/runtime/
Date Fri, 28 Jul 2006 13:57:54 GMT
Author: remm
Date: Fri Jul 28 06:57:53 2006
New Revision: 426537

URL: http://svn.apache.org/viewvc?rev=426537&view=rev
Log:
- JSP 2.1 API fixes.

Modified:
    tomcat/tc6.0.x/trunk/   (props changed)
    tomcat/tc6.0.x/trunk/java/javax/el/ArrayELResolver.java
    tomcat/tc6.0.x/trunk/java/javax/el/BeanELResolver.java
    tomcat/tc6.0.x/trunk/java/javax/el/CompositeELResolver.java
    tomcat/tc6.0.x/trunk/java/javax/el/ELContextListener.java
    tomcat/tc6.0.x/trunk/java/javax/el/ELResolver.java
    tomcat/tc6.0.x/trunk/java/javax/el/ListELResolver.java
    tomcat/tc6.0.x/trunk/java/javax/el/MapELResolver.java
    tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspContext.java
    tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java
    tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/el/ScopedAttributeELResolver.java
    tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/SimpleTagSupport.java
    tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagData.java
    tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagLibraryInfo.java
    tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagLibraryValidator.java
    tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagSupport.java
    tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
    tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
    tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Parser.java
    tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
    tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
    tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/PageContextImpl.java

Propchange: tomcat/tc6.0.x/trunk/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Jul 28 06:57:53 2006
@@ -0,0 +1,2 @@
+output
+.settings

Modified: tomcat/tc6.0.x/trunk/java/javax/el/ArrayELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/el/ArrayELResolver.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/el/ArrayELResolver.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/el/ArrayELResolver.java Fri Jul 28 06:57:53 2006
@@ -103,7 +103,7 @@
 		return this.readOnly;
 	}
 
-	public Iterator getFeatureDescriptors(ELContext context, Object base) {
+	public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object
base) {
 		if (base != null && base.getClass().isArray()) {
 			FeatureDescriptor[] descs = new FeatureDescriptor[Array.getLength(base)];
 			for (int i = 0; i < descs.length; i++) {

Modified: tomcat/tc6.0.x/trunk/java/javax/el/BeanELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/el/BeanELResolver.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/el/BeanELResolver.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/el/BeanELResolver.java Fri Jul 28 06:57:53 2006
@@ -17,6 +17,7 @@
 package javax.el;
 
 import java.beans.BeanInfo;
+import java.beans.FeatureDescriptor;
 import java.beans.IntrospectionException;
 import java.beans.Introspector;
 import java.beans.PropertyDescriptor;
@@ -129,7 +130,7 @@
 				|| this.property(context, base, property).isReadOnly();
 	}
 
-	public Iterator getFeatureDescriptors(ELContext context, Object base) {
+	public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object
base) {
 		if (context == null) {
 			throw new NullPointerException();
 		}
@@ -145,7 +146,7 @@
 				pds[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
 				pds[i].setValue(TYPE, pds[i].getPropertyType());
 			}
-			return Arrays.asList(pds).iterator();
+			return Arrays.asList((FeatureDescriptor[]) pds).iterator();
 		} catch (IntrospectionException e) {
 			//
 		}
@@ -165,7 +166,7 @@
 		return null;
 	}
 
-	private final static class BeanProperties {
+	protected final static class BeanProperties {
 		private final Map<String, BeanProperty> properties;
 
 		private final Class<?> type;
@@ -200,7 +201,7 @@
         }
 	}
 
-	private final static class BeanProperty {
+    protected final static class BeanProperty {
 		private final Class type;
 
 		private final Class owner;

Modified: tomcat/tc6.0.x/trunk/java/javax/el/CompositeELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/el/CompositeELResolver.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/el/CompositeELResolver.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/el/CompositeELResolver.java Fri Jul 28 06:57:53 2006
@@ -16,6 +16,7 @@
 
 package javax.el;
 
+import java.beans.FeatureDescriptor;
 import java.util.Iterator;
 
 public class CompositeELResolver extends ELResolver {
@@ -84,7 +85,7 @@
 		return false;
 	}
 
-	public Iterator getFeatureDescriptors(ELContext context, Object base) {
+	public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object
base) {
 		return new FeatureIterator(context, base, this.resolvers, this.size);
 	}
 
@@ -115,7 +116,7 @@
 		return null;
 	}
 
-	private final static class FeatureIterator implements Iterator {
+	private final static class FeatureIterator implements Iterator<FeatureDescriptor>
{
 
 		private final ELContext context;
 
@@ -152,7 +153,7 @@
 			return this.itr != null;
 		}
 
-		public Object next() {
+		public FeatureDescriptor next() {
 			Object result = null;
 			if (this.itr != null) {
 				if (this.itr.hasNext()) {
@@ -163,7 +164,7 @@
 					}
 				}
 			}
-			return result;
+			return (FeatureDescriptor) result;
 		}
 
 		public void remove() {

Modified: tomcat/tc6.0.x/trunk/java/javax/el/ELContextListener.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/el/ELContextListener.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/el/ELContextListener.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/el/ELContextListener.java Fri Jul 28 06:57:53 2006
@@ -20,7 +20,7 @@
  * @author Jacob Hookom [jacob/hookom.net]
  *
  */
-public interface ELContextListener {
+public interface ELContextListener extends java.util.EventListener {
     
     public void contextCreated(ELContextEvent event);
 

Modified: tomcat/tc6.0.x/trunk/java/javax/el/ELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/el/ELResolver.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/el/ELResolver.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/el/ELResolver.java Fri Jul 28 06:57:53 2006
@@ -62,7 +62,7 @@
 
     public abstract boolean isReadOnly(ELContext context, Object base, Object property) throws
NullPointerException, PropertyNotFoundException, ELException;
     
-    public abstract Iterator getFeatureDescriptors(ELContext context, Object base);
+    public abstract Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(ELContext
context, Object base);
     
     public abstract Class<?> getCommonPropertyType(ELContext context, Object base);
 }

Modified: tomcat/tc6.0.x/trunk/java/javax/el/ListELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/el/ListELResolver.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/el/ListELResolver.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/el/ListELResolver.java Fri Jul 28 06:57:53 2006
@@ -127,7 +127,7 @@
 		return this.readOnly;
 	}
 
-	public Iterator getFeatureDescriptors(ELContext context, Object base) {
+	public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object
base) {
 		if (base instanceof List) {
 			FeatureDescriptor[] descs = new FeatureDescriptor[((List) base).size()];
 			for (int i = 0; i < descs.length; i++) {

Modified: tomcat/tc6.0.x/trunk/java/javax/el/MapELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/el/MapELResolver.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/el/MapELResolver.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/el/MapELResolver.java Fri Jul 28 06:57:53 2006
@@ -107,10 +107,10 @@
 		return this.readOnly;
 	}
 
-	public Iterator getFeatureDescriptors(ELContext context, Object base) {
+	public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object
base) {
 		if (base instanceof Map) {
 			Iterator itr = ((Map) base).keySet().iterator();
-			List feats = new ArrayList();
+			List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();
 			Object key;
 			FeatureDescriptor desc;
 			while (itr.hasNext()) {

Modified: tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspContext.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspContext.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspContext.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/JspContext.java Fri Jul 28 06:57:53 2006
@@ -205,7 +205,7 @@
      *     invalidated.
      */
 
-    abstract public Enumeration getAttributeNamesInScope(int scope);
+    abstract public Enumeration<String> getAttributeNamesInScope(int scope);
 
     /**
      * The current value of the out object (a JspWriter).

Modified: tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java Fri Jul 28
06:57:53 2006
@@ -102,7 +102,7 @@
         return null;
     }
 
-    public Class<?> getType(ELContext context, Object base, Object property)
+    public Class getType(ELContext context, Object base, Object property)
             throws NullPointerException, PropertyNotFoundException, ELException {
         if (context == null) {
             throw new NullPointerException();
@@ -150,7 +150,7 @@
         return false;
     }
 
-    public Iterator getFeatureDescriptors(ELContext context, Object base) {
+    public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object
base) {
         List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>(
                 SCOPE_NAMES.length);
         FeatureDescriptor feat;
@@ -168,7 +168,7 @@
         return feats.iterator();
     }
 
-    public Class<?> getCommonPropertyType(ELContext context, Object base) {
+    public Class<String> getCommonPropertyType(ELContext context, Object base) {
         if (base == null) {
             return String.class;
         }

Modified: tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/el/ScopedAttributeELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/el/ScopedAttributeELResolver.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/el/ScopedAttributeELResolver.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/el/ScopedAttributeELResolver.java Fri Jul
28 06:57:53 2006
@@ -40,7 +40,7 @@
 		return null;
 	}
 
-	public Class<?> getType(ELContext context, Object base, Object property)
+	public Class getType(ELContext context, Object base, Object property)
 			throws NullPointerException, PropertyNotFoundException, ELException {
 		if (context == null) {
 			throw new NullPointerException();
@@ -91,10 +91,10 @@
 		return false;
 	}
 
-	public Iterator getFeatureDescriptors(ELContext context, Object base) {
+	public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object
base) {
 
 		PageContext ctxt = (PageContext) context.getContext(JspContext.class);
-		List list = new ArrayList();
+		List<FeatureDescriptor> list = new ArrayList<FeatureDescriptor>();
 		Enumeration e;
 		Object value;
 		String name;
@@ -173,7 +173,7 @@
 		}
 	}
 
-	public Class<?> getCommonPropertyType(ELContext context, Object base) {
+	public Class<String> getCommonPropertyType(ELContext context, Object base) {
 		if (base == null) {
 			return String.class;
 		}

Modified: tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/SimpleTagSupport.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/SimpleTagSupport.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/SimpleTagSupport.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/SimpleTagSupport.java Fri Jul 28 06:57:53
2006
@@ -175,7 +175,7 @@
      * or is an instance of the class specified
      */
     public static final JspTag findAncestorWithClass(
-	JspTag from, Class klass) 
+	JspTag from, Class<?> klass) 
     {
 	boolean isInterface = false;
 

Modified: tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagData.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagData.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagData.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagData.java Fri Jul 28 06:57:53 2006
@@ -55,14 +55,14 @@
      */
     public TagData(Object[] atts[]) {
 	if (atts == null) {
-	    attributes = new Hashtable();
+	    attributes = new Hashtable<String, Object>();
 	} else {
-	    attributes = new Hashtable(atts.length);
+	    attributes = new Hashtable<String, Object>(atts.length);
 	}
 
 	if (atts != null) {
 	    for (int i = 0; i < atts.length; i++) {
-		attributes.put(atts[i][0], atts[i][1]);
+		attributes.put((String) atts[i][0], atts[i][1]);
 	    }
 	}
     }
@@ -75,7 +75,7 @@
      *
      * @param attrs A hashtable to get the values from.
      */
-    public TagData(Hashtable attrs) {
+    public TagData(Hashtable<String, Object> attrs) {
         this.attributes = attrs;
     }
 
@@ -143,11 +143,11 @@
      *
      *@return An enumeration of the attributes in a TagData
      */
-    public java.util.Enumeration getAttributes() {
+    public java.util.Enumeration<String> getAttributes() {
         return attributes.keys();
     };
 
     // private data
 
-    private Hashtable attributes;	// the tagname/value map
+    private Hashtable<String, Object> attributes;	// the tagname/value map
 }

Modified: tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagLibraryInfo.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagLibraryInfo.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagLibraryInfo.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagLibraryInfo.java Fri Jul 28 06:57:53
2006
@@ -225,6 +225,22 @@
     }
 
 
+    /**
+     * Returns an array of TagLibraryInfo objects representing the entire set 
+     * of tag libraries (including this TagLibraryInfo) imported by taglib 
+     * directives in the translation unit that references this TagLibraryInfo. 
+     * If a tag library is imported more than once and bound to different prefices, 
+     * only the TagLibraryInfo bound to the first prefix must be included 
+     * in the returned array.
+     * 
+     * @return Array of TagLibraryInfo objects representing the entire set 
+     * of tag libraries (including this TagLibraryInfo) imported by taglib 
+     * directives in the translation unit that references this TagLibraryInfo.
+     * @since 2.1
+     */
+    public abstract javax.servlet.jsp.tagext.TagLibraryInfo[] getTagLibraryInfos();
+    
+    
     // Protected fields
 
     /**

Modified: tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagLibraryValidator.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagLibraryValidator.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagLibraryValidator.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagLibraryValidator.java Fri Jul 28
06:57:53 2006
@@ -94,7 +94,7 @@
      *
      * @param map A Map describing the init parameters
      */
-    public void setInitParameters(Map map) {
+    public void setInitParameters(Map<String, Object> map) {
 	initParameters = map;
     }
 
@@ -105,7 +105,7 @@
      *
      * @return The init parameters as an immutable map.
      */
-    public Map getInitParameters() {
+    public Map<String, Object> getInitParameters() {
 	return initParameters;
     }
 
@@ -138,6 +138,6 @@
     }
 
     // Private data
-    private Map initParameters;
+    private Map<String, Object> initParameters;
 
 }

Modified: tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagSupport.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagSupport.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagSupport.java (original)
+++ tomcat/tc6.0.x/trunk/java/javax/servlet/jsp/tagext/TagSupport.java Fri Jul 28 06:57:53
2006
@@ -228,7 +228,7 @@
 
     public void setValue(String k, Object o) {
 	if (values == null) {
-	    values = new Hashtable();
+	    values = new Hashtable<String, Object>();
 	}
 	values.put(k, o);
     }
@@ -267,7 +267,7 @@
      *     or null or an empty Enumeration if no values have been set.
      */
 
-    public Enumeration getValues() {
+    public Enumeration<String> getValues() {
 	if (values == null) {
 	    return null;
 	}
@@ -277,7 +277,7 @@
     // private fields
 
     private   Tag         parent;
-    private   Hashtable   values;
+    private   Hashtable<String, Object>   values;
     /**
      * The value of the id attribute of this tag; or null.
      */

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java Fri Jul
28 06:57:53 2006
@@ -44,6 +44,7 @@
     private Hashtable tagFileMap;
 
     private ParserController pc;
+    private PageInfo pi;
     private Vector vec;
 
     /**
@@ -51,11 +52,13 @@
      */
     public ImplicitTagLibraryInfo(JspCompilationContext ctxt,
 				  ParserController pc,
+                  PageInfo pi,
 				  String prefix,
 				  String tagdir,
 				  ErrorDispatcher err) throws JasperException {
         super(prefix, null);
 	this.pc = pc;
+    this.pi = pi;
 	this.tagFileMap = new Hashtable();
 	this.vec = new Vector();
 
@@ -138,4 +141,10 @@
 
 	return tagFile;
     }
+    
+    public TagLibraryInfo[] getTagLibraryInfos() {
+        Collection coll = pi.getTaglibs();
+        return (TagLibraryInfo[]) coll.toArray(new TagLibraryInfo[0]);
+    }
+    
 }

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java Fri Jul 28
06:57:53 2006
@@ -1232,6 +1232,7 @@
                 new ImplicitTagLibraryInfo(
                     ctxt,
                     parserController,
+                    pageInfo,
                     prefix,
                     tagdir,
                     err);
@@ -1261,6 +1262,7 @@
                         new TagLibraryInfoImpl(
                             ctxt,
                             parserController,
+                            pageInfo,
                             prefix,
                             uri,
                             location,

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Parser.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Parser.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Parser.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Parser.java Fri Jul 28 06:57:53 2006
@@ -415,7 +415,7 @@
                     }
                     if (impl == null) {
                         String[] location = ctxt.getTldLocation(uri);
-                        impl = new TagLibraryInfoImpl(ctxt, parserController,
+                        impl = new TagLibraryInfoImpl(ctxt, parserController, pageInfo,
                                 prefix, uri, location, err);
                         if (ctxt.getOptions().isCaching()) {
                             ctxt.getOptions().getCache().put(uri, impl);
@@ -431,7 +431,7 @@
                     if (pageInfo.getTaglib(urnTagdir) == null) {
                         pageInfo.addTaglib(urnTagdir,
                                 new ImplicitTagLibraryInfo(ctxt,
-                                        parserController, prefix, tagdir, err));
+                                        parserController, pageInfo, prefix, tagdir, err));
                     }
                     pageInfo.addPrefixMapping(prefix, urnTagdir);
                 }

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java Fri Jul 28
06:57:53 2006
@@ -23,6 +23,7 @@
 import java.io.StringWriter;
 import java.net.JarURLConnection;
 import java.net.URL;
+import java.util.Collection;
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Iterator;
@@ -67,6 +68,8 @@
     private Hashtable jarEntries;
 
     private JspCompilationContext ctxt;
+    
+    private PageInfo pi;
 
     private ErrorDispatcher err;
 
@@ -128,13 +131,14 @@
     /**
      * Constructor.
      */
-    public TagLibraryInfoImpl(JspCompilationContext ctxt, ParserController pc,
+    public TagLibraryInfoImpl(JspCompilationContext ctxt, ParserController pc, PageInfo pi,
             String prefix, String uriIn, String[] location, ErrorDispatcher err)
             throws JasperException {
         super(prefix, uriIn);
 
         this.ctxt = ctxt;
         this.parserController = pc;
+        this.pi = pi;
         this.err = err;
         InputStream in = null;
         JarFile jarFile = null;
@@ -197,6 +201,11 @@
 
     }
 
+    public TagLibraryInfo[] getTagLibraryInfos() {
+        Collection coll = pi.getTaglibs();
+        return (TagLibraryInfo[]) coll.toArray(new TagLibraryInfo[0]);
+    }
+    
     /*
      * @param ctxt The JSP compilation context @param uri The TLD's uri @param
      * in The TLD's input stream @param jarFileUrl The JAR file containing the

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java Fri Jul 28
06:57:53 2006
@@ -220,7 +220,7 @@
 		}
 	}
 
-	public Enumeration getAttributeNamesInScope(int scope) {
+	public Enumeration<String> getAttributeNamesInScope(int scope) {
 		if (scope == PAGE_SCOPE) {
 			return pageAttributes.keys();
 		}

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/PageContextImpl.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/PageContextImpl.java?rev=426537&r1=426536&r2=426537&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/PageContextImpl.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/PageContextImpl.java Fri Jul 28 06:57:53
2006
@@ -491,7 +491,7 @@
 		return context.getAttribute(name);
 	}
 
-	public Enumeration getAttributeNamesInScope(final int scope) {
+	public Enumeration<String> getAttributeNamesInScope(final int scope) {
 		if (SecurityUtil.isPackageProtectionEnabled()) {
 			return (Enumeration) AccessController
 					.doPrivileged(new PrivilegedAction() {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message