tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r978865 [2/4] - in /tomcat/trunk: ./ java/org/apache/jasper/ java/org/apache/jasper/compiler/ java/org/apache/jasper/el/ java/org/apache/jasper/runtime/ java/org/apache/jasper/servlet/ java/org/apache/jasper/tagplugins/jstl/ java/org/apache...
Date Sat, 24 Jul 2010 13:03:12 GMT
Modified: tomcat/trunk/java/org/apache/jasper/compiler/ServletWriter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ServletWriter.java?rev=978865&r1=978864&r2=978865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/ServletWriter.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ServletWriter.java Sat Jul 24 13:03:11 2010
@@ -40,11 +40,11 @@ public class ServletWriter {
 
 
     public ServletWriter(PrintWriter writer) {
-	this.writer = writer;
+        this.writer = writer;
     }
 
     public void close() {
-	writer.close();
+        writer.close();
     }
 
     
@@ -58,15 +58,15 @@ public class ServletWriter {
     // -------------------- Formatting --------------------
 
     public void pushIndent() {
-	virtual_indent += TAB_WIDTH;
-	if (virtual_indent >= 0 && virtual_indent <= SPACES.length())
-	    indent = virtual_indent;
+        virtual_indent += TAB_WIDTH;
+        if (virtual_indent >= 0 && virtual_indent <= SPACES.length())
+            indent = virtual_indent;
     }
 
     public void popIndent() {
-	virtual_indent -= TAB_WIDTH;
-	if (virtual_indent >= 0 && virtual_indent <= SPACES.length())
-	    indent = virtual_indent;
+        virtual_indent -= TAB_WIDTH;
+        if (virtual_indent >= 0 && virtual_indent <= SPACES.length())
+            indent = virtual_indent;
     }
 
     /**
@@ -74,7 +74,7 @@ public class ServletWriter {
      */
     public void println(String s) {
         javaLine++;
-	writer.println(s);
+        writer.println(s);
     }
 
     /**
@@ -82,22 +82,22 @@ public class ServletWriter {
      */
     public void println() {
         javaLine++;
-	writer.println("");
+        writer.println("");
     }
 
     /**
      * Prints the current indention
      */
     public void printin() {
-	writer.print(SPACES.substring(0, indent));
+        writer.print(SPACES.substring(0, indent));
     }
 
     /**
      * Prints the current indention, followed by the given string
      */
     public void printin(String s) {
-	writer.print(SPACES.substring(0, indent));
-	writer.print(s);
+        writer.print(SPACES.substring(0, indent));
+        writer.print(s);
     }
 
     /**
@@ -105,8 +105,8 @@ public class ServletWriter {
      */
     public void printil(String s) {
         javaLine++;
-	writer.print(SPACES.substring(0, indent));
-	writer.println(s);
+        writer.print(SPACES.substring(0, indent));
+        writer.println(s);
     }
 
     /**
@@ -115,14 +115,14 @@ public class ServletWriter {
      * Use println() to print a '\n'.
      */
     public void print(char c) {
-	writer.print(c);
+        writer.print(c);
     }
 
     /**
      * Prints the given int.
      */
     public void print(int i) {
-	writer.print(i);
+        writer.print(i);
     }
 
     /**
@@ -132,7 +132,7 @@ public class ServletWriter {
      * off.
      */
     public void print(String s) {
-	writer.print(s);
+        writer.print(s);
     }
 
     /**
@@ -150,6 +150,6 @@ public class ServletWriter {
             index++;
         }
 
-	writer.print(s);
+        writer.print(s);
     }
 }

Modified: tomcat/trunk/java/org/apache/jasper/compiler/SmapGenerator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/SmapGenerator.java?rev=978865&r1=978864&r2=978865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/SmapGenerator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/SmapGenerator.java Sat Jul 24 13:03:11 2010
@@ -59,7 +59,7 @@ public class SmapGenerator {
      * source file.  E.g., "foo$jsp.java".
      */
     public synchronized void setOutputFileName(String x) {
-	outputFileName = x;
+        outputFileName = x;
     }
 
     /**
@@ -75,10 +75,10 @@ public class SmapGenerator {
      *                overwritten
      */
     public synchronized void addStratum(SmapStratum stratum,
-					boolean defaultStratum) {
-	strata.add(stratum);
-	if (defaultStratum)
-	    this.defaultStratum = stratum.getStratumName();
+                                        boolean defaultStratum) {
+        strata.add(stratum);
+        if (defaultStratum)
+            this.defaultStratum = stratum.getStratumName();
     }
 
     /**
@@ -89,9 +89,9 @@ public class SmapGenerator {
      *                    that produced the <tt>smap</tt> to be embedded
      */
     public synchronized void addSmap(String smap, String stratumName) {
-	embedded.add("*O " + stratumName + "\n"
-		   + smap
-		   + "*C " + stratumName + "\n");
+        embedded.add("*O " + stratumName + "\n"
+                   + smap
+                   + "*C " + stratumName + "\n");
     }
 
     /**
@@ -101,42 +101,42 @@ public class SmapGenerator {
      * @param status If <tt>false</tt>, ignore any embedded SMAPs.
      */
     public void setDoEmbedded(boolean status) {
-	doEmbedded = status;
+        doEmbedded = status;
     }
 
     //*********************************************************************
     // Methods for serializing the logical SMAP
 
     public synchronized String getString() {
-	// check state and initialize buffer
-	if (outputFileName == null)
-	    throw new IllegalStateException();
+        // check state and initialize buffer
+        if (outputFileName == null)
+            throw new IllegalStateException();
         StringBuilder out = new StringBuilder();
 
-	// start the SMAP
-	out.append("SMAP\n");
-	out.append(outputFileName + '\n');
-	out.append(defaultStratum + '\n');
-
-	// include embedded SMAPs
-	if (doEmbedded) {
-	    int nEmbedded = embedded.size();
-	    for (int i = 0; i < nEmbedded; i++) {
-	        out.append(embedded.get(i));
-	    }
-	}
-
-	// print our StratumSections, FileSections, and LineSections
-	int nStrata = strata.size();
-	for (int i = 0; i < nStrata; i++) {
-	    SmapStratum s = strata.get(i);
-	    out.append(s.getString());
-	}
+        // start the SMAP
+        out.append("SMAP\n");
+        out.append(outputFileName + '\n');
+        out.append(defaultStratum + '\n');
+
+        // include embedded SMAPs
+        if (doEmbedded) {
+            int nEmbedded = embedded.size();
+            for (int i = 0; i < nEmbedded; i++) {
+                out.append(embedded.get(i));
+            }
+        }
+
+        // print our StratumSections, FileSections, and LineSections
+        int nStrata = strata.size();
+        for (int i = 0; i < nStrata; i++) {
+            SmapStratum s = strata.get(i);
+            out.append(s.getString());
+        }
 
-	// end the SMAP
-	out.append("*E\n");
+        // end the SMAP
+        out.append("*E\n");
 
-	return out.toString();
+        return out.toString();
     }
 
     @Override
@@ -146,27 +146,27 @@ public class SmapGenerator {
     // For testing (and as an example of use)...
 
     public static void main(String args[]) {
-	SmapGenerator g = new SmapGenerator();
-	g.setOutputFileName("foo.java");
-	SmapStratum s = new SmapStratum("JSP");
-	s.addFile("foo.jsp");
-	s.addFile("bar.jsp", "/foo/foo/bar.jsp");
-	s.addLineData(1, "foo.jsp", 1, 1, 1);
-	s.addLineData(2, "foo.jsp", 1, 6, 1);
-	s.addLineData(3, "foo.jsp", 2, 10, 5);
-	s.addLineData(20, "bar.jsp", 1, 30, 1);
-	g.addStratum(s, true);
-	System.out.print(g);
-
-	System.out.println("---");
-
-	SmapGenerator embedded = new SmapGenerator();
-	embedded.setOutputFileName("blargh.tier2");
-	s = new SmapStratum("Tier2");
-	s.addFile("1.tier2");
-	s.addLineData(1, "1.tier2", 1, 1, 1);
-	embedded.addStratum(s, true);
-	g.addSmap(embedded.toString(), "JSP");
-	System.out.println(g);
+        SmapGenerator g = new SmapGenerator();
+        g.setOutputFileName("foo.java");
+        SmapStratum s = new SmapStratum("JSP");
+        s.addFile("foo.jsp");
+        s.addFile("bar.jsp", "/foo/foo/bar.jsp");
+        s.addLineData(1, "foo.jsp", 1, 1, 1);
+        s.addLineData(2, "foo.jsp", 1, 6, 1);
+        s.addLineData(3, "foo.jsp", 2, 10, 5);
+        s.addLineData(20, "bar.jsp", 1, 30, 1);
+        g.addStratum(s, true);
+        System.out.print(g);
+
+        System.out.println("---");
+
+        SmapGenerator embedded = new SmapGenerator();
+        embedded.setOutputFileName("blargh.tier2");
+        s = new SmapStratum("Tier2");
+        s.addFile("1.tier2");
+        s.addLineData(1, "1.tier2", 1, 1, 1);
+        embedded.addStratum(s, true);
+        g.addSmap(embedded.toString(), "JSP");
+        System.out.println(g);
     }
 }

Modified: tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java?rev=978865&r1=978864&r2=978865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/SmapUtil.java Sat Jul 24 13:03:11 2010
@@ -78,7 +78,7 @@ public class SmapUtil {
         
         /** Disable reading of input SMAP because:
             1. There is a bug here: getRealPath() is null if .jsp is in a jar
-        	Bugzilla 14660.
+               Bugzilla 14660.
             2. Mappings from other sources into .jsp files are not supported.
             TODO: fix 1. if 2. is not true.
         // determine if we have an input SMAP

Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java?rev=978865&r1=978864&r2=978865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TagPluginManager.java Sat Jul 24 13:03:11 2010
@@ -43,18 +43,18 @@ public class TagPluginManager {
     private PageInfo pageInfo;
 
     public TagPluginManager(ServletContext ctxt) {
-	this.ctxt = ctxt;
+        this.ctxt = ctxt;
     }
 
     public void apply(Node.Nodes page, ErrorDispatcher err, PageInfo pageInfo)
-	    throws JasperException {
+            throws JasperException {
 
-	init(err);
-	if (tagPlugins == null || tagPlugins.size() == 0) {
-	    return;
-	}
+        init(err);
+        if (tagPlugins == null || tagPlugins.size() == 0) {
+            return;
+        }
 
-	this.pageInfo = pageInfo;
+        this.pageInfo = pageInfo;
 
         page.visit(new Node.Visitor() {
             @Override
@@ -68,54 +68,54 @@ public class TagPluginManager {
     }
  
     private void init(ErrorDispatcher err) throws JasperException {
-	if (initialized)
-	    return;
+        if (initialized)
+            return;
+
+        InputStream is = ctxt.getResourceAsStream(TAG_PLUGINS_XML);
+        if (is == null)
+            return;
 
-	InputStream is = ctxt.getResourceAsStream(TAG_PLUGINS_XML);
-	if (is == null)
-	    return;
-
-	TreeNode root = (new ParserUtils()).parseXMLDocument(TAG_PLUGINS_XML,
-							     is);
-	if (root == null) {
-	    return;
-	}
-
-	if (!TAG_PLUGINS_ROOT_ELEM.equals(root.getName())) {
-	    err.jspError("jsp.error.plugin.wrongRootElement", TAG_PLUGINS_XML,
-			 TAG_PLUGINS_ROOT_ELEM);
-	}
-
-	tagPlugins = new HashMap<String, TagPlugin>();
-	Iterator<TreeNode> pluginList = root.findChildren("tag-plugin");
-	while (pluginList.hasNext()) {
-	    TreeNode pluginNode = pluginList.next();
+        TreeNode root = (new ParserUtils()).parseXMLDocument(TAG_PLUGINS_XML,
+                                                             is);
+        if (root == null) {
+            return;
+        }
+
+        if (!TAG_PLUGINS_ROOT_ELEM.equals(root.getName())) {
+            err.jspError("jsp.error.plugin.wrongRootElement", TAG_PLUGINS_XML,
+                         TAG_PLUGINS_ROOT_ELEM);
+        }
+
+        tagPlugins = new HashMap<String, TagPlugin>();
+        Iterator<TreeNode> pluginList = root.findChildren("tag-plugin");
+        while (pluginList.hasNext()) {
+            TreeNode pluginNode = pluginList.next();
             TreeNode tagClassNode = pluginNode.findChild("tag-class");
-	    if (tagClassNode == null) {
-		// Error
-		return;
-	    }
-	    String tagClass = tagClassNode.getBody().trim();
-	    TreeNode pluginClassNode = pluginNode.findChild("plugin-class");
-	    if (pluginClassNode == null) {
-		// Error
-		return;
-	    }
-
-	    String pluginClassStr = pluginClassNode.getBody();
-	    TagPlugin tagPlugin = null;
-	    try {
-		Class<?> pluginClass = Class.forName(pluginClassStr);
-		tagPlugin = (TagPlugin) pluginClass.newInstance();
-	    } catch (Exception e) {
-		throw new JasperException(e);
-	    }
-	    if (tagPlugin == null) {
-		return;
-	    }
-	    tagPlugins.put(tagClass, tagPlugin);
-	}
-	initialized = true;
+            if (tagClassNode == null) {
+                // Error
+                return;
+            }
+            String tagClass = tagClassNode.getBody().trim();
+            TreeNode pluginClassNode = pluginNode.findChild("plugin-class");
+            if (pluginClassNode == null) {
+                // Error
+                return;
+            }
+
+            String pluginClassStr = pluginClassNode.getBody();
+            TagPlugin tagPlugin = null;
+            try {
+                Class<?> pluginClass = Class.forName(pluginClassStr);
+                tagPlugin = (TagPlugin) pluginClass.newInstance();
+            } catch (Exception e) {
+                throw new JasperException(e);
+            }
+            if (tagPlugin == null) {
+                return;
+            }
+            tagPlugins.put(tagClass, tagPlugin);
+        }
+        initialized = true;
     }
 
     /**
@@ -125,31 +125,31 @@ public class TagPluginManager {
      * The given custom tag node will be manipulated by the plugin.
      */
     private void invokePlugin(Node.CustomTag n) {
-	TagPlugin tagPlugin = tagPlugins.get(n.getTagHandlerClass().getName());
-	if (tagPlugin == null) {
-	    return;
-	}
-
-	TagPluginContext tagPluginContext = new TagPluginContextImpl(n, pageInfo);
-	n.setTagPluginContext(tagPluginContext);
-	tagPlugin.doTag(tagPluginContext);
+        TagPlugin tagPlugin = tagPlugins.get(n.getTagHandlerClass().getName());
+        if (tagPlugin == null) {
+            return;
+        }
+
+        TagPluginContext tagPluginContext = new TagPluginContextImpl(n, pageInfo);
+        n.setTagPluginContext(tagPluginContext);
+        tagPlugin.doTag(tagPluginContext);
     }
 
     static class TagPluginContextImpl implements TagPluginContext {
-	private Node.CustomTag node;
-	private Node.Nodes curNodes;
-	private PageInfo pageInfo;
-	private HashMap<String, Object> pluginAttributes;
-
-	TagPluginContextImpl(Node.CustomTag n, PageInfo pageInfo) {
-	    this.node = n;
-	    this.pageInfo = pageInfo;
-	    curNodes = new Node.Nodes();
-	    n.setAtETag(curNodes);
-	    curNodes = new Node.Nodes();
-	    n.setAtSTag(curNodes);
-	    n.setUseTagPlugin(true);
-	    pluginAttributes = new HashMap<String, Object>();
+        private Node.CustomTag node;
+        private Node.Nodes curNodes;
+        private PageInfo pageInfo;
+        private HashMap<String, Object> pluginAttributes;
+
+        TagPluginContextImpl(Node.CustomTag n, PageInfo pageInfo) {
+            this.node = n;
+            this.pageInfo = pageInfo;
+            curNodes = new Node.Nodes();
+            n.setAtETag(curNodes);
+            curNodes = new Node.Nodes();
+            n.setAtSTag(curNodes);
+            n.setUseTagPlugin(true);
+            pluginAttributes = new HashMap<String, Object>();
         }
 
         public TagPluginContext getParentContext() {

Modified: tomcat/trunk/java/org/apache/jasper/compiler/TextOptimizer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TextOptimizer.java?rev=978865&r1=978864&r2=978865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/TextOptimizer.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TextOptimizer.java Sat Jul 24 13:03:11 2010
@@ -45,7 +45,7 @@ public class TextOptimizer {
             collectText();
         }
 
-	/*
+        /*
          * The following directives are ignored in text concatenation
          */
 
@@ -117,7 +117,7 @@ public class TextOptimizer {
         TextCatVisitor v = new TextCatVisitor(compiler);
         page.visit(v);
 
-	// Cleanup, in case the page ends with a template text
+        // Cleanup, in case the page ends with a template text
         v.collectText();
     }
 }

Modified: tomcat/trunk/java/org/apache/jasper/el/ELResolverImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/el/ELResolverImpl.java?rev=978865&r1=978864&r2=978865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/el/ELResolverImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/el/ELResolverImpl.java Sat Jul 24 13:03:11 2010
@@ -35,132 +35,132 @@ import javax.servlet.jsp.el.VariableReso
 import org.apache.jasper.Constants;
 
 public final class ELResolverImpl extends ELResolver {
-	private final static ELResolver DefaultResolver = new CompositeELResolver();
+    private final static ELResolver DefaultResolver = new CompositeELResolver();
 
-	static {
-		((CompositeELResolver) DefaultResolver).add(new MapELResolver());
-		((CompositeELResolver) DefaultResolver).add(new ResourceBundleELResolver());
-		((CompositeELResolver) DefaultResolver).add(new ListELResolver());
-		((CompositeELResolver) DefaultResolver).add(new ArrayELResolver());
-		((CompositeELResolver) DefaultResolver).add(new BeanELResolver());
-	}
-
-	private final VariableResolver variableResolver;
-
-	public ELResolverImpl(VariableResolver variableResolver) {
-		this.variableResolver = variableResolver;
-	}
+    static {
+        ((CompositeELResolver) DefaultResolver).add(new MapELResolver());
+        ((CompositeELResolver) DefaultResolver).add(new ResourceBundleELResolver());
+        ((CompositeELResolver) DefaultResolver).add(new ListELResolver());
+        ((CompositeELResolver) DefaultResolver).add(new ArrayELResolver());
+        ((CompositeELResolver) DefaultResolver).add(new BeanELResolver());
+    }
+
+    private final VariableResolver variableResolver;
+
+    public ELResolverImpl(VariableResolver variableResolver) {
+        this.variableResolver = variableResolver;
+    }
 
-	@Override
+    @Override
     public Object getValue(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base == null) {
-			context.setPropertyResolved(true);
-			if (property != null) {
-				try {
-					return this.variableResolver.resolveVariable(property
-							.toString());
-				} catch (javax.servlet.jsp.el.ELException e) {
-					throw new ELException(e.getMessage(), e.getCause());
-				}
-			}
-		}
-
-		if (!context.isPropertyResolved()) {
-			return getDefaultResolver().getValue(context, base, property);
-		}
-		return null;
-	}
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base == null) {
+            context.setPropertyResolved(true);
+            if (property != null) {
+                try {
+                    return this.variableResolver.resolveVariable(property
+                            .toString());
+                } catch (javax.servlet.jsp.el.ELException e) {
+                    throw new ELException(e.getMessage(), e.getCause());
+                }
+            }
+        }
+
+        if (!context.isPropertyResolved()) {
+            return getDefaultResolver().getValue(context, base, property);
+        }
+        return null;
+    }
 
-	@Override
+    @Override
     public Class<?> getType(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base == null) {
-			context.setPropertyResolved(true);
-			if (property != null) {
-				try {
-					Object obj = this.variableResolver.resolveVariable(property
-							.toString());
-					return (obj != null) ? obj.getClass() : null;
-				} catch (javax.servlet.jsp.el.ELException e) {
-					throw new ELException(e.getMessage(), e.getCause());
-				}
-			}
-		}
-
-		if (!context.isPropertyResolved()) {
-			return getDefaultResolver().getType(context, base, property);
-		}
-		return null;
-	}
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base == null) {
+            context.setPropertyResolved(true);
+            if (property != null) {
+                try {
+                    Object obj = this.variableResolver.resolveVariable(property
+                            .toString());
+                    return (obj != null) ? obj.getClass() : null;
+                } catch (javax.servlet.jsp.el.ELException e) {
+                    throw new ELException(e.getMessage(), e.getCause());
+                }
+            }
+        }
+
+        if (!context.isPropertyResolved()) {
+            return getDefaultResolver().getType(context, base, property);
+        }
+        return null;
+    }
 
-	@Override
+    @Override
     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) {
-			context.setPropertyResolved(true);
-			throw new PropertyNotWritableException(
-					"Legacy VariableResolver wrapped, not writable");
-		}
-
-		if (!context.isPropertyResolved()) {
-			getDefaultResolver().setValue(context, base, property, value);
-		}
-	}
+            Object value) throws NullPointerException,
+            PropertyNotFoundException, PropertyNotWritableException,
+            ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base == null) {
+            context.setPropertyResolved(true);
+            throw new PropertyNotWritableException(
+                    "Legacy VariableResolver wrapped, not writable");
+        }
+
+        if (!context.isPropertyResolved()) {
+            getDefaultResolver().setValue(context, base, property, value);
+        }
+    }
 
-	@Override
+    @Override
     public boolean isReadOnly(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base == null) {
-			context.setPropertyResolved(true);
-			return true;
-		}
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base == null) {
+            context.setPropertyResolved(true);
+            return true;
+        }
 
-		return getDefaultResolver().isReadOnly(context, base, property);
-	}
+        return getDefaultResolver().isReadOnly(context, base, property);
+    }
 
-	@Override
+    @Override
     public Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
-		return getDefaultResolver().getFeatureDescriptors(context, base);
-	}
+        return getDefaultResolver().getFeatureDescriptors(context, base);
+    }
 
-	@Override
+    @Override
     public Class<?> getCommonPropertyType(ELContext context, Object base) {
-		if (base == null) {
-			return String.class;
-		}
-		return getDefaultResolver().getCommonPropertyType(context, base);
-	}
-
-	public static ELResolver getDefaultResolver() {
-	    if (Constants.IS_SECURITY_ENABLED) {
-	        CompositeELResolver defaultResolver = new CompositeELResolver();
-	        defaultResolver.add(new MapELResolver());
-	        defaultResolver.add(new ResourceBundleELResolver());
-	        defaultResolver.add(new ListELResolver());
-	        defaultResolver.add(new ArrayELResolver());
-	        defaultResolver.add(new BeanELResolver());
-	        return defaultResolver;
-	    } else {
-	        return DefaultResolver;
-	    }
-	}
+        if (base == null) {
+            return String.class;
+        }
+        return getDefaultResolver().getCommonPropertyType(context, base);
+    }
+
+    public static ELResolver getDefaultResolver() {
+        if (Constants.IS_SECURITY_ENABLED) {
+            CompositeELResolver defaultResolver = new CompositeELResolver();
+            defaultResolver.add(new MapELResolver());
+            defaultResolver.add(new ResourceBundleELResolver());
+            defaultResolver.add(new ListELResolver());
+            defaultResolver.add(new ArrayELResolver());
+            defaultResolver.add(new BeanELResolver());
+            return defaultResolver;
+        } else {
+            return DefaultResolver;
+        }
+    }
 }

Modified: tomcat/trunk/java/org/apache/jasper/el/ExpressionEvaluatorImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/el/ExpressionEvaluatorImpl.java?rev=978865&r1=978864&r2=978865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/el/ExpressionEvaluatorImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/el/ExpressionEvaluatorImpl.java Sat Jul 24 13:03:11 2010
@@ -28,37 +28,37 @@ import javax.servlet.jsp.el.VariableReso
 @Deprecated
 public final class ExpressionEvaluatorImpl extends ExpressionEvaluator {
 
-	private final ExpressionFactory factory;
-	
-	public ExpressionEvaluatorImpl(ExpressionFactory factory) {
-		this.factory = factory;
-	}
+    private final ExpressionFactory factory;
+    
+    public ExpressionEvaluatorImpl(ExpressionFactory factory) {
+        this.factory = factory;
+    }
 
-	@Override
+    @Override
     public Expression parseExpression(String expression,
             @SuppressWarnings("unchecked") // API does not use generics
             Class expectedType,
-			FunctionMapper fMapper) throws ELException {
-		try {
-			ELContextImpl ctx =
-			    new ELContextImpl(ELResolverImpl.getDefaultResolver());
+            FunctionMapper fMapper) throws ELException {
+        try {
+            ELContextImpl ctx =
+                new ELContextImpl(ELResolverImpl.getDefaultResolver());
             if (fMapper != null) {
                 ctx.setFunctionMapper(new FunctionMapperImpl(fMapper));
             }
-			ValueExpression ve = this.factory.createValueExpression(ctx, expression, expectedType);
-			return new ExpressionImpl(ve);
-		} catch (javax.el.ELException e) {
-			throw new ELParseException(e.getMessage());
-		}
-	}
+            ValueExpression ve = this.factory.createValueExpression(ctx, expression, expectedType);
+            return new ExpressionImpl(ve);
+        } catch (javax.el.ELException e) {
+            throw new ELParseException(e.getMessage());
+        }
+    }
 
-	@Override
+    @Override
     public Object evaluate(String expression,
             @SuppressWarnings("unchecked") // API does not use generics
             Class expectedType,
-			VariableResolver vResolver, FunctionMapper fMapper)
-			throws ELException {
-		return this.parseExpression(expression, expectedType, fMapper).evaluate(vResolver);
-	}
+            VariableResolver vResolver, FunctionMapper fMapper)
+            throws ELException {
+        return this.parseExpression(expression, expectedType, fMapper).evaluate(vResolver);
+    }
 
 }

Modified: tomcat/trunk/java/org/apache/jasper/el/ExpressionImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/el/ExpressionImpl.java?rev=978865&r1=978864&r2=978865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/el/ExpressionImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/el/ExpressionImpl.java Sat Jul 24 13:03:11 2010
@@ -25,16 +25,16 @@ import javax.servlet.jsp.el.VariableReso
 @Deprecated
 public final class ExpressionImpl extends Expression {
 
-	private final ValueExpression ve;
-	
-	public ExpressionImpl(ValueExpression ve) {
-		this.ve = ve;
-	}
+    private final ValueExpression ve;
+    
+    public ExpressionImpl(ValueExpression ve) {
+        this.ve = ve;
+    }
 
-	@Override
+    @Override
     public Object evaluate(VariableResolver vResolver) throws ELException {
-		ELContext ctx = new ELContextImpl(new ELResolverImpl(vResolver));
-		return ve.getValue(ctx);
-	}
+        ELContext ctx = new ELContextImpl(new ELResolverImpl(vResolver));
+        return ve.getValue(ctx);
+    }
 
 }

Modified: tomcat/trunk/java/org/apache/jasper/el/FunctionMapperImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/el/FunctionMapperImpl.java?rev=978865&r1=978864&r2=978865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/el/FunctionMapperImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/el/FunctionMapperImpl.java Sat Jul 24 13:03:11 2010
@@ -22,16 +22,16 @@ import javax.servlet.jsp.el.FunctionMapp
 
 @Deprecated
 public final class FunctionMapperImpl extends javax.el.FunctionMapper {
-	
-	private final FunctionMapper fnMapper;
+    
+    private final FunctionMapper fnMapper;
 
-	public FunctionMapperImpl(FunctionMapper fnMapper) {
-		this.fnMapper = fnMapper;
-	}
+    public FunctionMapperImpl(FunctionMapper fnMapper) {
+        this.fnMapper = fnMapper;
+    }
 
-	@Override
+    @Override
     public Method resolveFunction(String prefix, String localName) {
-		return this.fnMapper.resolveFunction(prefix, localName);
-	}
+        return this.fnMapper.resolveFunction(prefix, localName);
+    }
 
 }

Modified: tomcat/trunk/java/org/apache/jasper/el/VariableResolverImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/el/VariableResolverImpl.java?rev=978865&r1=978864&r2=978865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/el/VariableResolverImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/el/VariableResolverImpl.java Sat Jul 24 13:03:11 2010
@@ -23,14 +23,14 @@ import javax.servlet.jsp.el.VariableReso
 @Deprecated
 public final class VariableResolverImpl implements VariableResolver {
 
-	private final ELContext ctx;
-	
-	public VariableResolverImpl(ELContext ctx) {
-		this.ctx = ctx;
-	}
+    private final ELContext ctx;
+    
+    public VariableResolverImpl(ELContext ctx) {
+        this.ctx = ctx;
+    }
 
-	public Object resolveVariable(String pName) throws ELException {
-		return this.ctx.getELResolver().getValue(this.ctx, null, pName);
-	}
+    public Object resolveVariable(String pName) throws ELException {
+        return this.ctx.getELResolver().getValue(this.ctx, null, pName);
+    }
 
 }

Modified: tomcat/trunk/java/org/apache/jasper/runtime/HttpJspBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/HttpJspBase.java?rev=978865&r1=978864&r2=978865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/runtime/HttpJspBase.java (original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/HttpJspBase.java Sat Jul 24 13:03:11 2010
@@ -33,34 +33,29 @@ import org.apache.jasper.compiler.Locali
  *
  * @author Anil K. Vijendran
  */
-public abstract class HttpJspBase 
-    extends HttpServlet 
-    implements HttpJspPage 
-        
-    
-{
+public abstract class HttpJspBase extends HttpServlet implements HttpJspPage {
     
     protected HttpJspBase() {
     }
 
     @Override
     public final void init(ServletConfig config) 
-	throws ServletException 
+        throws ServletException 
     {
         super.init(config);
-	jspInit();
+        jspInit();
         _jspInit();
     }
     
     @Override
     public String getServletInfo() {
-	return Localizer.getMessage("jsp.engine.info");
+        return Localizer.getMessage("jsp.engine.info");
     }
 
     @Override
     public final void destroy() {
-	jspDestroy();
-	_jspDestroy();
+        jspDestroy();
+        _jspDestroy();
     }
 
     /**
@@ -68,7 +63,7 @@ public abstract class HttpJspBase 
      */
     @Override
     public final void service(HttpServletRequest request, HttpServletResponse response) 
-	throws ServletException, IOException 
+        throws ServletException, IOException 
     {
         _jspService(request, response);
     }
@@ -86,6 +81,6 @@ public abstract class HttpJspBase 
     }
 
     public abstract void _jspService(HttpServletRequest request, 
-				     HttpServletResponse response) 
-	throws ServletException, IOException;
+                                     HttpServletResponse response) 
+        throws ServletException, IOException;
 }

Modified: tomcat/trunk/java/org/apache/jasper/runtime/InstanceManagerFactory.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/InstanceManagerFactory.java?rev=978865&r1=978864&r2=978865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/runtime/InstanceManagerFactory.java (original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/InstanceManagerFactory.java Sat Jul 24 13:03:11 2010
@@ -34,7 +34,7 @@ public class InstanceManagerFactory {
 
     public static InstanceManager getInstanceManager(ServletConfig config) {
         InstanceManager instanceManager = 
-        	(InstanceManager) config.getServletContext().getAttribute(InstanceManager.class.getName());
+                (InstanceManager) config.getServletContext().getAttribute(InstanceManager.class.getName());
         if (instanceManager == null) {
             throw new IllegalStateException("No org.apache.tomcat.InstanceManager set in ServletContext");
         }

Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspApplicationContextImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspApplicationContextImpl.java?rev=978865&r1=978864&r2=978865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/runtime/JspApplicationContextImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/JspApplicationContextImpl.java Sat Jul 24 13:03:11 2010
@@ -48,105 +48,105 @@ import org.apache.jasper.el.ELContextImp
  */
 public class JspApplicationContextImpl implements JspApplicationContext {
 
-	private final static String KEY = JspApplicationContextImpl.class.getName();
+    private final static String KEY = JspApplicationContextImpl.class.getName();
 
-	private final static ExpressionFactory expressionFactory =
-	    ExpressionFactory.newInstance();
+    private final static ExpressionFactory expressionFactory =
+        ExpressionFactory.newInstance();
 
-	private final List<ELContextListener> contextListeners = new ArrayList<ELContextListener>();
+    private final List<ELContextListener> contextListeners = new ArrayList<ELContextListener>();
 
-	private final List<ELResolver> resolvers = new ArrayList<ELResolver>();
+    private final List<ELResolver> resolvers = new ArrayList<ELResolver>();
 
-	private boolean instantiated = false;
-
-	private ELResolver resolver;
-
-	public JspApplicationContextImpl() {
-
-	}
-
-	public void addELContextListener(ELContextListener listener) {
-		if (listener == null) {
-			throw new IllegalArgumentException("ELConextListener was null");
-		}
-		this.contextListeners.add(listener);
-	}
-
-	public static JspApplicationContextImpl getInstance(ServletContext context) {
-		if (context == null) {
-			throw new IllegalArgumentException("ServletContext was null");
-		}
-		JspApplicationContextImpl impl = (JspApplicationContextImpl) context
-				.getAttribute(KEY);
-		if (impl == null) {
-			impl = new JspApplicationContextImpl();
-			context.setAttribute(KEY, impl);
-		}
-		return impl;
-	}
-
-	public ELContextImpl createELContext(JspContext context) {
-		if (context == null) {
-			throw new IllegalArgumentException("JspContext was null");
-		}
-
-		// create ELContext for JspContext
-		final ELResolver r = this.createELResolver();
-		ELContextImpl ctx;
-		if (Constants.IS_SECURITY_ENABLED) {
-		    ctx = AccessController.doPrivileged(
-		            new PrivilegedAction<ELContextImpl>() {
-		                public ELContextImpl run() {
-		                    return new ELContextImpl(r);
-		                }
-		            });
-		} else {
-		    ctx = new ELContextImpl(r);
-		}
-		ctx.putContext(JspContext.class, context);
-
-		// alert all ELContextListeners
-		ELContextEvent event = new ELContextEvent(ctx);
-		for (int i = 0; i < this.contextListeners.size(); i++) {
-			this.contextListeners.get(i).contextCreated(event);
-		}
-
-		return ctx;
-	}
-
-	private ELResolver createELResolver() {
-		this.instantiated = true;
-		if (this.resolver == null) {
-			CompositeELResolver r = new CompositeELResolver();
-			r.add(new ImplicitObjectELResolver());
-			for (Iterator<ELResolver> itr = this.resolvers.iterator();
-			        itr.hasNext();) {
-				r.add(itr.next());
-			}
-			r.add(new MapELResolver());
-			r.add(new ResourceBundleELResolver());
-			r.add(new ListELResolver());
-			r.add(new ArrayELResolver());	
-			r.add(new BeanELResolver());
-			r.add(new ScopedAttributeELResolver());
-			this.resolver = r;
-		}
-		return this.resolver;
-	}
-
-	public void addELResolver(ELResolver resolver) throws IllegalStateException {
-		if (resolver == null) {
-			throw new IllegalArgumentException("ELResolver was null");
-		}
-		if (this.instantiated) {
-			throw new IllegalStateException(
-					"cannot call addELResolver after the first request has been made");
-		}
-		this.resolvers.add(resolver);
-	}
-
-	public ExpressionFactory getExpressionFactory() {
-		return expressionFactory;
-	}
+    private boolean instantiated = false;
+
+    private ELResolver resolver;
+
+    public JspApplicationContextImpl() {
+
+    }
+
+    public void addELContextListener(ELContextListener listener) {
+        if (listener == null) {
+            throw new IllegalArgumentException("ELConextListener was null");
+        }
+        this.contextListeners.add(listener);
+    }
+
+    public static JspApplicationContextImpl getInstance(ServletContext context) {
+        if (context == null) {
+            throw new IllegalArgumentException("ServletContext was null");
+        }
+        JspApplicationContextImpl impl = (JspApplicationContextImpl) context
+                .getAttribute(KEY);
+        if (impl == null) {
+            impl = new JspApplicationContextImpl();
+            context.setAttribute(KEY, impl);
+        }
+        return impl;
+    }
+
+    public ELContextImpl createELContext(JspContext context) {
+        if (context == null) {
+            throw new IllegalArgumentException("JspContext was null");
+        }
+
+        // create ELContext for JspContext
+        final ELResolver r = this.createELResolver();
+        ELContextImpl ctx;
+        if (Constants.IS_SECURITY_ENABLED) {
+            ctx = AccessController.doPrivileged(
+                    new PrivilegedAction<ELContextImpl>() {
+                        public ELContextImpl run() {
+                            return new ELContextImpl(r);
+                        }
+                    });
+        } else {
+            ctx = new ELContextImpl(r);
+        }
+        ctx.putContext(JspContext.class, context);
+
+        // alert all ELContextListeners
+        ELContextEvent event = new ELContextEvent(ctx);
+        for (int i = 0; i < this.contextListeners.size(); i++) {
+            this.contextListeners.get(i).contextCreated(event);
+        }
+
+        return ctx;
+    }
+
+    private ELResolver createELResolver() {
+        this.instantiated = true;
+        if (this.resolver == null) {
+            CompositeELResolver r = new CompositeELResolver();
+            r.add(new ImplicitObjectELResolver());
+            for (Iterator<ELResolver> itr = this.resolvers.iterator();
+                    itr.hasNext();) {
+                r.add(itr.next());
+            }
+            r.add(new MapELResolver());
+            r.add(new ResourceBundleELResolver());
+            r.add(new ListELResolver());
+            r.add(new ArrayELResolver());    
+            r.add(new BeanELResolver());
+            r.add(new ScopedAttributeELResolver());
+            this.resolver = r;
+        }
+        return this.resolver;
+    }
+
+    public void addELResolver(ELResolver resolver) throws IllegalStateException {
+        if (resolver == null) {
+            throw new IllegalArgumentException("ELResolver was null");
+        }
+        if (this.instantiated) {
+            throw new IllegalStateException(
+                    "cannot call addELResolver after the first request has been made");
+        }
+        this.resolvers.add(resolver);
+    }
+
+    public ExpressionFactory getExpressionFactory() {
+        return expressionFactory;
+    }
 
 }

Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java?rev=978865&r1=978864&r2=978865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java (original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java Sat Jul 24 13:03:11 2010
@@ -59,438 +59,438 @@ import org.apache.jasper.util.Enumerator
  */
 public class JspContextWrapper extends PageContext implements VariableResolver {
 
-	// Invoking JSP context
-	private PageContext invokingJspCtxt;
+    // Invoking JSP context
+    private PageContext invokingJspCtxt;
 
-	private transient HashMap<String, Object> pageAttributes;
+    private transient HashMap<String, Object> pageAttributes;
 
-	// ArrayList of NESTED scripting variables
-	private ArrayList<String> nestedVars;
+    // ArrayList of NESTED scripting variables
+    private ArrayList<String> nestedVars;
 
-	// ArrayList of AT_BEGIN scripting variables
-	private ArrayList<String> atBeginVars;
+    // ArrayList of AT_BEGIN scripting variables
+    private ArrayList<String> atBeginVars;
 
-	// ArrayList of AT_END scripting variables
-	private ArrayList<String> atEndVars;
+    // ArrayList of AT_END scripting variables
+    private ArrayList<String> atEndVars;
 
-	private Map<String,String> aliases;
+    private Map<String,String> aliases;
 
-	private HashMap<String, Object> originalNestedVars;
+    private HashMap<String, Object> originalNestedVars;
 
-	public JspContextWrapper(JspContext jspContext,
-	        ArrayList<String> nestedVars, ArrayList<String> atBeginVars,
-	        ArrayList<String> atEndVars, Map<String,String> aliases) {
-		this.invokingJspCtxt = (PageContext) jspContext;
-		this.nestedVars = nestedVars;
-		this.atBeginVars = atBeginVars;
-		this.atEndVars = atEndVars;
-		this.pageAttributes = new HashMap<String, Object>(16);
-		this.aliases = aliases;
+    public JspContextWrapper(JspContext jspContext,
+            ArrayList<String> nestedVars, ArrayList<String> atBeginVars,
+            ArrayList<String> atEndVars, Map<String,String> aliases) {
+        this.invokingJspCtxt = (PageContext) jspContext;
+        this.nestedVars = nestedVars;
+        this.atBeginVars = atBeginVars;
+        this.atEndVars = atEndVars;
+        this.pageAttributes = new HashMap<String, Object>(16);
+        this.aliases = aliases;
 
-		if (nestedVars != null) {
-			this.originalNestedVars = new HashMap<String, Object>(nestedVars.size());
-		}
-		syncBeginTagFile();
-	}
+        if (nestedVars != null) {
+            this.originalNestedVars = new HashMap<String, Object>(nestedVars.size());
+        }
+        syncBeginTagFile();
+    }
 
-	@Override
+    @Override
     public void initialize(Servlet servlet, ServletRequest request,
-			ServletResponse response, String errorPageURL,
-			boolean needsSession, int bufferSize, boolean autoFlush)
-			throws IOException, IllegalStateException, IllegalArgumentException {
-	}
+            ServletResponse response, String errorPageURL,
+            boolean needsSession, int bufferSize, boolean autoFlush)
+            throws IOException, IllegalStateException, IllegalArgumentException {
+    }
 
-	@Override
+    @Override
     public Object getAttribute(String name) {
 
-		if (name == null) {
-			throw new NullPointerException(Localizer
-					.getMessage("jsp.error.attribute.null_name"));
-		}
+        if (name == null) {
+            throw new NullPointerException(Localizer
+                    .getMessage("jsp.error.attribute.null_name"));
+        }
 
-		return pageAttributes.get(name);
-	}
+        return pageAttributes.get(name);
+    }
 
-	@Override
+    @Override
     public Object getAttribute(String name, int scope) {
 
-		if (name == null) {
-			throw new NullPointerException(Localizer
-					.getMessage("jsp.error.attribute.null_name"));
-		}
-
-		if (scope == PAGE_SCOPE) {
-			return pageAttributes.get(name);
-		}
+        if (name == null) {
+            throw new NullPointerException(Localizer
+                    .getMessage("jsp.error.attribute.null_name"));
+        }
+
+        if (scope == PAGE_SCOPE) {
+            return pageAttributes.get(name);
+        }
 
-		return invokingJspCtxt.getAttribute(name, scope);
-	}
+        return invokingJspCtxt.getAttribute(name, scope);
+    }
 
-	@Override
+    @Override
     public void setAttribute(String name, Object value) {
 
-		if (name == null) {
-			throw new NullPointerException(Localizer
-					.getMessage("jsp.error.attribute.null_name"));
-		}
-
-		if (value != null) {
-			pageAttributes.put(name, value);
-		} else {
-			removeAttribute(name, PAGE_SCOPE);
-		}
-	}
+        if (name == null) {
+            throw new NullPointerException(Localizer
+                    .getMessage("jsp.error.attribute.null_name"));
+        }
+
+        if (value != null) {
+            pageAttributes.put(name, value);
+        } else {
+            removeAttribute(name, PAGE_SCOPE);
+        }
+    }
 
-	@Override
+    @Override
     public void setAttribute(String name, Object value, int scope) {
 
-		if (name == null) {
-			throw new NullPointerException(Localizer
-					.getMessage("jsp.error.attribute.null_name"));
-		}
-
-		if (scope == PAGE_SCOPE) {
-			if (value != null) {
-				pageAttributes.put(name, value);
-			} else {
-				removeAttribute(name, PAGE_SCOPE);
-			}
-		} else {
-			invokingJspCtxt.setAttribute(name, value, scope);
-		}
-	}
+        if (name == null) {
+            throw new NullPointerException(Localizer
+                    .getMessage("jsp.error.attribute.null_name"));
+        }
+
+        if (scope == PAGE_SCOPE) {
+            if (value != null) {
+                pageAttributes.put(name, value);
+            } else {
+                removeAttribute(name, PAGE_SCOPE);
+            }
+        } else {
+            invokingJspCtxt.setAttribute(name, value, scope);
+        }
+    }
 
-	@Override
+    @Override
     public Object findAttribute(String name) {
 
-		if (name == null) {
-			throw new NullPointerException(Localizer
-					.getMessage("jsp.error.attribute.null_name"));
-		}
-
-		Object o = pageAttributes.get(name);
-		if (o == null) {
-			o = invokingJspCtxt.getAttribute(name, REQUEST_SCOPE);
-			if (o == null) {
-				if (getSession() != null) {
-					o = invokingJspCtxt.getAttribute(name, SESSION_SCOPE);
-				}
-				if (o == null) {
-					o = invokingJspCtxt.getAttribute(name, APPLICATION_SCOPE);
-				}
-			}
-		}
+        if (name == null) {
+            throw new NullPointerException(Localizer
+                    .getMessage("jsp.error.attribute.null_name"));
+        }
+
+        Object o = pageAttributes.get(name);
+        if (o == null) {
+            o = invokingJspCtxt.getAttribute(name, REQUEST_SCOPE);
+            if (o == null) {
+                if (getSession() != null) {
+                    o = invokingJspCtxt.getAttribute(name, SESSION_SCOPE);
+                }
+                if (o == null) {
+                    o = invokingJspCtxt.getAttribute(name, APPLICATION_SCOPE);
+                }
+            }
+        }
 
-		return o;
-	}
+        return o;
+    }
 
-	@Override
+    @Override
     public void removeAttribute(String name) {
 
-		if (name == null) {
-			throw new NullPointerException(Localizer
-					.getMessage("jsp.error.attribute.null_name"));
-		}
-
-		pageAttributes.remove(name);
-		invokingJspCtxt.removeAttribute(name, REQUEST_SCOPE);
-		if (getSession() != null) {
-			invokingJspCtxt.removeAttribute(name, SESSION_SCOPE);
-		}
-		invokingJspCtxt.removeAttribute(name, APPLICATION_SCOPE);
-	}
+        if (name == null) {
+            throw new NullPointerException(Localizer
+                    .getMessage("jsp.error.attribute.null_name"));
+        }
+
+        pageAttributes.remove(name);
+        invokingJspCtxt.removeAttribute(name, REQUEST_SCOPE);
+        if (getSession() != null) {
+            invokingJspCtxt.removeAttribute(name, SESSION_SCOPE);
+        }
+        invokingJspCtxt.removeAttribute(name, APPLICATION_SCOPE);
+    }
 
-	@Override
+    @Override
     public void removeAttribute(String name, int scope) {
 
-		if (name == null) {
-			throw new NullPointerException(Localizer
-					.getMessage("jsp.error.attribute.null_name"));
-		}
-
-		if (scope == PAGE_SCOPE) {
-			pageAttributes.remove(name);
-		} else {
-			invokingJspCtxt.removeAttribute(name, scope);
-		}
-	}
+        if (name == null) {
+            throw new NullPointerException(Localizer
+                    .getMessage("jsp.error.attribute.null_name"));
+        }
+
+        if (scope == PAGE_SCOPE) {
+            pageAttributes.remove(name);
+        } else {
+            invokingJspCtxt.removeAttribute(name, scope);
+        }
+    }
 
-	@Override
+    @Override
     public int getAttributesScope(String name) {
 
-		if (name == null) {
-			throw new NullPointerException(Localizer
-					.getMessage("jsp.error.attribute.null_name"));
-		}
-
-		if (pageAttributes.get(name) != null) {
-			return PAGE_SCOPE;
-		} else {
-			return invokingJspCtxt.getAttributesScope(name);
-		}
-	}
+        if (name == null) {
+            throw new NullPointerException(Localizer
+                    .getMessage("jsp.error.attribute.null_name"));
+        }
+
+        if (pageAttributes.get(name) != null) {
+            return PAGE_SCOPE;
+        } else {
+            return invokingJspCtxt.getAttributesScope(name);
+        }
+    }
 
-	@Override
+    @Override
     public Enumeration<String> getAttributeNamesInScope(int scope) {
-		if (scope == PAGE_SCOPE) {
-			return new Enumerator<String>(pageAttributes.keySet().iterator());
-		}
+        if (scope == PAGE_SCOPE) {
+            return new Enumerator<String>(pageAttributes.keySet().iterator());
+        }
 
-		return invokingJspCtxt.getAttributeNamesInScope(scope);
-	}
+        return invokingJspCtxt.getAttributeNamesInScope(scope);
+    }
 
-	@Override
+    @Override
     public void release() {
-		invokingJspCtxt.release();
-	}
+        invokingJspCtxt.release();
+    }
 
-	@Override
+    @Override
     public JspWriter getOut() {
-		return invokingJspCtxt.getOut();
-	}
+        return invokingJspCtxt.getOut();
+    }
 
-	@Override
+    @Override
     public HttpSession getSession() {
-		return invokingJspCtxt.getSession();
-	}
+        return invokingJspCtxt.getSession();
+    }
 
-	@Override
+    @Override
     public Object getPage() {
-		return invokingJspCtxt.getPage();
-	}
+        return invokingJspCtxt.getPage();
+    }
 
-	@Override
+    @Override
     public ServletRequest getRequest() {
-		return invokingJspCtxt.getRequest();
-	}
+        return invokingJspCtxt.getRequest();
+    }
 
-	@Override
+    @Override
     public ServletResponse getResponse() {
-		return invokingJspCtxt.getResponse();
-	}
+        return invokingJspCtxt.getResponse();
+    }
 
-	@Override
+    @Override
     public Exception getException() {
-		return invokingJspCtxt.getException();
-	}
+        return invokingJspCtxt.getException();
+    }
 
-	@Override
+    @Override
     public ServletConfig getServletConfig() {
-		return invokingJspCtxt.getServletConfig();
-	}
+        return invokingJspCtxt.getServletConfig();
+    }
 
-	@Override
+    @Override
     public ServletContext getServletContext() {
-		return invokingJspCtxt.getServletContext();
-	}
+        return invokingJspCtxt.getServletContext();
+    }
 
-	@Override
+    @Override
     public void forward(String relativeUrlPath) throws ServletException,
-			IOException {
-		invokingJspCtxt.forward(relativeUrlPath);
-	}
+            IOException {
+        invokingJspCtxt.forward(relativeUrlPath);
+    }
 
-	@Override
+    @Override
     public void include(String relativeUrlPath) throws ServletException,
-			IOException {
-		invokingJspCtxt.include(relativeUrlPath);
-	}
+            IOException {
+        invokingJspCtxt.include(relativeUrlPath);
+    }
 
-	@Override
+    @Override
     public void include(String relativeUrlPath, boolean flush)
-			throws ServletException, IOException {
-		invokingJspCtxt.include(relativeUrlPath, false);
-	}
+            throws ServletException, IOException {
+        invokingJspCtxt.include(relativeUrlPath, false);
+    }
 
-	@Override
-	@Deprecated
+    @Override
+    @Deprecated
     public VariableResolver getVariableResolver() {
-		return this;
-	}
+        return this;
+    }
 
-	@Override
+    @Override
     public BodyContent pushBody() {
-		return invokingJspCtxt.pushBody();
-	}
+        return invokingJspCtxt.pushBody();
+    }
 
-	@Override
+    @Override
     public JspWriter pushBody(Writer writer) {
-		return invokingJspCtxt.pushBody(writer);
-	}
+        return invokingJspCtxt.pushBody(writer);
+    }
 
-	@Override
+    @Override
     public JspWriter popBody() {
-		return invokingJspCtxt.popBody();
-	}
+        return invokingJspCtxt.popBody();
+    }
 
-	@Override
-	@Deprecated
+    @Override
+    @Deprecated
     public ExpressionEvaluator getExpressionEvaluator() {
-		return invokingJspCtxt.getExpressionEvaluator();
-	}
+        return invokingJspCtxt.getExpressionEvaluator();
+    }
 
-	@Override
+    @Override
     public void handlePageException(Exception ex) throws IOException,
-			ServletException {
-		// Should never be called since handleException() called with a
-		// Throwable in the generated servlet.
-		handlePageException((Throwable) ex);
-	}
+            ServletException {
+        // Should never be called since handleException() called with a
+        // Throwable in the generated servlet.
+        handlePageException((Throwable) ex);
+    }
 
-	@Override
+    @Override
     public void handlePageException(Throwable t) throws IOException,
-			ServletException {
-		invokingJspCtxt.handlePageException(t);
-	}
-
-	/**
-	 * VariableResolver interface
-	 */
-	@Deprecated
-	public Object resolveVariable(String pName) throws ELException {
-		ELContext ctx = this.getELContext();
-		return ctx.getELResolver().getValue(ctx, null, pName);
-	}
-
-	/**
-	 * Synchronize variables at begin of tag file
-	 */
-	public void syncBeginTagFile() {
-		saveNestedVariables();
-	}
-
-	/**
-	 * Synchronize variables before fragment invocation
-	 */
-	public void syncBeforeInvoke() {
-		copyTagToPageScope(VariableInfo.NESTED);
-		copyTagToPageScope(VariableInfo.AT_BEGIN);
-	}
-
-	/**
-	 * Synchronize variables at end of tag file
-	 */
-	public void syncEndTagFile() {
-		copyTagToPageScope(VariableInfo.AT_BEGIN);
-		copyTagToPageScope(VariableInfo.AT_END);
-		restoreNestedVariables();
-	}
-
-	/**
-	 * Copies the variables of the given scope from the virtual page scope of
-	 * this JSP context wrapper to the page scope of the invoking JSP context.
-	 * 
-	 * @param scope
-	 *            variable scope (one of NESTED, AT_BEGIN, or AT_END)
-	 */
-	private void copyTagToPageScope(int scope) {
-		Iterator<String> iter = null;
-
-		switch (scope) {
-		case VariableInfo.NESTED:
-			if (nestedVars != null) {
-				iter = nestedVars.iterator();
-			}
-			break;
-		case VariableInfo.AT_BEGIN:
-			if (atBeginVars != null) {
-				iter = atBeginVars.iterator();
-			}
-			break;
-		case VariableInfo.AT_END:
-			if (atEndVars != null) {
-				iter = atEndVars.iterator();
-			}
-			break;
-		}
-
-		while ((iter != null) && iter.hasNext()) {
-			String varName = iter.next();
-			Object obj = getAttribute(varName);
-			varName = findAlias(varName);
-			if (obj != null) {
-				invokingJspCtxt.setAttribute(varName, obj);
-			} else {
-				invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE);
-			}
-		}
-	}
-
-	/**
-	 * Saves the values of any NESTED variables that are present in the invoking
-	 * JSP context, so they can later be restored.
-	 */
-	private void saveNestedVariables() {
-		if (nestedVars != null) {
-			Iterator<String> iter = nestedVars.iterator();
-			while (iter.hasNext()) {
-				String varName = iter.next();
-				varName = findAlias(varName);
-				Object obj = invokingJspCtxt.getAttribute(varName);
-				if (obj != null) {
-					originalNestedVars.put(varName, obj);
-				}
-			}
-		}
-	}
-
-	/**
-	 * Restores the values of any NESTED variables in the invoking JSP context.
-	 */
-	private void restoreNestedVariables() {
-		if (nestedVars != null) {
-			Iterator<String> iter = nestedVars.iterator();
-			while (iter.hasNext()) {
-				String varName = iter.next();
-				varName = findAlias(varName);
-				Object obj = originalNestedVars.get(varName);
-				if (obj != null) {
-					invokingJspCtxt.setAttribute(varName, obj);
-				} else {
-					invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE);
-				}
-			}
-		}
-	}
-
-	/**
-	 * Checks to see if the given variable name is used as an alias, and if so,
-	 * returns the variable name for which it is used as an alias.
-	 * 
-	 * @param varName
-	 *            The variable name to check
-	 * @return The variable name for which varName is used as an alias, or
-	 *         varName if it is not being used as an alias
-	 */
-	private String findAlias(String varName) {
-
-		if (aliases == null)
-			return varName;
-
-		String alias = aliases.get(varName);
-		if (alias == null) {
-			return varName;
-		}
-		return alias;
-	}
+            ServletException {
+        invokingJspCtxt.handlePageException(t);
+    }
+
+    /**
+     * VariableResolver interface
+     */
+    @Deprecated
+    public Object resolveVariable(String pName) throws ELException {
+        ELContext ctx = this.getELContext();
+        return ctx.getELResolver().getValue(ctx, null, pName);
+    }
+
+    /**
+     * Synchronize variables at begin of tag file
+     */
+    public void syncBeginTagFile() {
+        saveNestedVariables();
+    }
+
+    /**
+     * Synchronize variables before fragment invocation
+     */
+    public void syncBeforeInvoke() {
+        copyTagToPageScope(VariableInfo.NESTED);
+        copyTagToPageScope(VariableInfo.AT_BEGIN);
+    }
+
+    /**
+     * Synchronize variables at end of tag file
+     */
+    public void syncEndTagFile() {
+        copyTagToPageScope(VariableInfo.AT_BEGIN);
+        copyTagToPageScope(VariableInfo.AT_END);
+        restoreNestedVariables();
+    }
+
+    /**
+     * Copies the variables of the given scope from the virtual page scope of
+     * this JSP context wrapper to the page scope of the invoking JSP context.
+     * 
+     * @param scope
+     *            variable scope (one of NESTED, AT_BEGIN, or AT_END)
+     */
+    private void copyTagToPageScope(int scope) {
+        Iterator<String> iter = null;
+
+        switch (scope) {
+        case VariableInfo.NESTED:
+            if (nestedVars != null) {
+                iter = nestedVars.iterator();
+            }
+            break;
+        case VariableInfo.AT_BEGIN:
+            if (atBeginVars != null) {
+                iter = atBeginVars.iterator();
+            }
+            break;
+        case VariableInfo.AT_END:
+            if (atEndVars != null) {
+                iter = atEndVars.iterator();
+            }
+            break;
+        }
+
+        while ((iter != null) && iter.hasNext()) {
+            String varName = iter.next();
+            Object obj = getAttribute(varName);
+            varName = findAlias(varName);
+            if (obj != null) {
+                invokingJspCtxt.setAttribute(varName, obj);
+            } else {
+                invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE);
+            }
+        }
+    }
+
+    /**
+     * Saves the values of any NESTED variables that are present in the invoking
+     * JSP context, so they can later be restored.
+     */
+    private void saveNestedVariables() {
+        if (nestedVars != null) {
+            Iterator<String> iter = nestedVars.iterator();
+            while (iter.hasNext()) {
+                String varName = iter.next();
+                varName = findAlias(varName);
+                Object obj = invokingJspCtxt.getAttribute(varName);
+                if (obj != null) {
+                    originalNestedVars.put(varName, obj);
+                }
+            }
+        }
+    }
+
+    /**
+     * Restores the values of any NESTED variables in the invoking JSP context.
+     */
+    private void restoreNestedVariables() {
+        if (nestedVars != null) {
+            Iterator<String> iter = nestedVars.iterator();
+            while (iter.hasNext()) {
+                String varName = iter.next();
+                varName = findAlias(varName);
+                Object obj = originalNestedVars.get(varName);
+                if (obj != null) {
+                    invokingJspCtxt.setAttribute(varName, obj);
+                } else {
+                    invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE);
+                }
+            }
+        }
+    }
+
+    /**
+     * Checks to see if the given variable name is used as an alias, and if so,
+     * returns the variable name for which it is used as an alias.
+     * 
+     * @param varName
+     *            The variable name to check
+     * @return The variable name for which varName is used as an alias, or
+     *         varName if it is not being used as an alias
+     */
+    private String findAlias(String varName) {
+
+        if (aliases == null)
+            return varName;
+
+        String alias = aliases.get(varName);
+        if (alias == null) {
+            return varName;
+        }
+        return alias;
+    }
 
-	//private ELContextImpl elContext;
+    //private ELContextImpl elContext;
 
-	@Override
+    @Override
     public ELContext getELContext() {
         // instead decorate!!!
         
         return this.invokingJspCtxt.getELContext();
         
         /*
-		if (this.elContext != null) {
-			JspFactory jspFact = JspFactory.getDefaultFactory();
-			ServletContext servletContext = this.getServletContext();
-			JspApplicationContextImpl jspCtx = (JspApplicationContextImpl) jspFact
-					.getJspApplicationContext(servletContext);
-			this.elContext = jspCtx.createELContext(this);
-		}
-		return this.elContext;
+        if (this.elContext != null) {
+            JspFactory jspFact = JspFactory.getDefaultFactory();
+            ServletContext servletContext = this.getServletContext();
+            JspApplicationContextImpl jspCtx = (JspApplicationContextImpl) jspFact
+                    .getJspApplicationContext(servletContext);
+            this.elContext = jspCtx.createELContext(this);
+        }
+        return this.elContext;
         */
-	}
+    }
 }

Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspWriterImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspWriterImpl.java?rev=978865&r1=978864&r2=978865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/runtime/JspWriterImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/JspWriterImpl.java Sat Jul 24 13:03:11 2010
@@ -70,7 +70,7 @@ public class JspWriterImpl extends JspWr
      * buffer of the given size.
      *
      * @param  response A Servlet Response
-     * @param  sz   	Output-buffer size, a positive integer
+     * @param  sz       Output-buffer size, a positive integer
      *
      * @exception  IllegalArgumentException  If sz is <= 0
      */



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


Mime
View raw message