You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ak...@hyperreal.org on 1999/11/13 01:32:56 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/jasper/runtime BodyContentImpl.java HttpJspBase.java JspServlet.java

akv         99/11/12 16:32:55

  Modified:    src/share/org/apache/jasper Constants.java
               src/share/org/apache/jasper/compiler BeanGenerator.java
                        JspCompiler.java TagLibraryInfoImpl.java
               src/share/org/apache/jasper/runtime BodyContentImpl.java
                        HttpJspBase.java JspServlet.java
  Log:
  cvs update -j TOMCAT_J2EE_10F_102199 src/share/org/apache/jasper
  
  Revision  Changes    Path
  1.9       +0 -1      jakarta-tomcat/src/share/org/apache/jasper/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/Constants.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Constants.java	1999/11/08 03:14:18	1.8
  +++ Constants.java	1999/11/13 00:32:44	1.9
  @@ -1,5 +1,4 @@
   /*
  - * 
    * The Apache Software License, Version 1.1
    *
    * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  
  
  
  1.3       +0 -39     jakarta-tomcat/src/share/org/apache/jasper/compiler/BeanGenerator.java
  
  Index: BeanGenerator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/BeanGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BeanGenerator.java	1999/11/08 03:14:25	1.2
  +++ BeanGenerator.java	1999/11/13 00:32:47	1.3
  @@ -133,45 +133,6 @@
   		throw new JasperException (m);
   	    }	     
   	    
  -	    // Check if the class exists.
  -	    //String className = (clsname == null) ? type : clsname;
  -	    //try {
  -	    //boolean tmp = beanInfo.ClassFound (className);
  -	    //} catch (ClassNotFoundException ex) {
  -	    //  String m = Constants.getString(
  -	    //	"jsp.error.usebean.class.notfound", 
  -	    //	 new Object[] { className });
  -	    //throw new JasperException (m, ex);
  -	    //}
  -	    
  -	    // Check if beanName exists.
  -	    //if (beanName != null) {
  -	    //try {
  -	    //  boolean  tmp = beanInfo.beanFound (beanName);
  -	    //} catch (ClassNotFoundException ex) {
  -	    //      String m = Constants.getString(
  -	    //    		"jsp.error.usebean.class.notfound", 
  -	    //		new Object[] { beanName });
  -	    //    throw new JasperException (m, ex);
  -	    //} 
  -	    //}
  -	    
  -	    // class must be assignable to type.
  -	    //if (clsname != null && type != null) {
  -	    //try {
  -	    //    Class tp = beanInfo.getClass (type);
  -	    //    Class cl = beanInfo.getClass (clsname);
  -	    //    if (!tp.isAssignableFrom(cl)) {
  -	    //          String m = Constants.getString("jsp.error.usebean.bad.type.cast",
  -	    //				       new Object[] {name, type, clsname});
  -	    //	throw new JasperException (m);
  -	    //      }
  -                    
  -	    //} catch (ClassNotFoundException ex) {
  -	    //    throw new JasperException (ex);
  -	    //}
  -	    //}
  -
   	    if (clsname == null) clsname = type;
   	    if (scope == null || scope.equals("page")) {
   		beanInfo.addPageBean(name, clsname);
  
  
  
  1.3       +0 -1      jakarta-tomcat/src/share/org/apache/jasper/compiler/JspCompiler.java
  
  Index: JspCompiler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JspCompiler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JspCompiler.java	1999/11/08 03:14:26	1.2
  +++ JspCompiler.java	1999/11/13 00:32:47	1.3
  @@ -1,5 +1,4 @@
   /*
  - * 
    * The Apache Software License, Version 1.1
    *
    * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  
  
  
  1.8       +38 -39    jakarta-tomcat/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
  
  Index: TagLibraryInfoImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TagLibraryInfoImpl.java	1999/11/08 03:14:33	1.7
  +++ TagLibraryInfoImpl.java	1999/11/13 00:32:47	1.8
  @@ -145,51 +145,50 @@
   	    // Parse web.xml.
   	    InputStream is = ctxt.getServletContext().getResourceAsStream(WEBAPP_INF);
   	    
  -	    if (is == null) {
  -		throw new IOException(Constants.getString("jsp.error.webxml_not_found"));
  -	    }
  +	    if (is != null) {
   	    
  -	    URL dtdURL =  this.getClass().getResource(Constants.WEBAPP_DTD_RESOURCE);
  -	    XmlDocument webtld = JspUtil.parseXMLDoc(is, dtdURL,
  -						     Constants.WEBAPP_DTD_PUBLIC_ID);
  -	    NodeList nList =  webtld.getElementsByTagName("taglib");
  +                URL dtdURL =  this.getClass().getResource(Constants.WEBAPP_DTD_RESOURCE);
  +                XmlDocument webtld = JspUtil.parseXMLDoc(is, dtdURL,
  +                                                         Constants.WEBAPP_DTD_PUBLIC_ID);
  +                NodeList nList =  webtld.getElementsByTagName("taglib");
   	    
  -	    // Check if a matching "taglib" exists.
  -	    // XXX. Some changes that akv recommended.
  -	    if (nList.getLength() != 0) {
  -		for(int i = 0; i < nList.getLength(); i++) {
  -		    Element e = (Element) nList.item(i);
  -		    NodeList list = e.getChildNodes();
  -		    String tagLoc = null;
  -		    boolean match = false;
  -		    for(int j = 0; j < list.getLength(); j++) {
  -			Element em = (Element) list.item(j);
  -			String tname = em.getNodeName();
  -			if (tname.equals("taglib-location")) {
  -                            Text t = (Text) em.getFirstChild();
  -                            if (t != null) {
  -                                tagLoc = t.getData();
  -                                if (tagLoc != null)
  -                                    tagLoc = tagLoc.trim();
  +                // Check if a matching "taglib" exists.
  +                // XXX. Some changes that akv recommended.
  +                if (nList.getLength() != 0) {
  +                    for(int i = 0; i < nList.getLength(); i++) {
  +                        Element e = (Element) nList.item(i);
  +                        NodeList list = e.getChildNodes();
  +                        String tagLoc = null;
  +                        boolean match = false;
  +                        for(int j = 0; j < list.getLength(); j++) {
  +                            Element em = (Element) list.item(j);
  +                            String tname = em.getNodeName();
  +                            if (tname.equals("taglib-location")) {
  +                                Text t = (Text) em.getFirstChild();
  +                                if (t != null) {
  +                                    tagLoc = t.getData();
  +                                    if (tagLoc != null)
  +                                        tagLoc = tagLoc.trim();
  +                                }
                               }
  -			}
  -			if (tname.equals("taglib-uri")) {
  -                            Text t = (Text) em.getFirstChild();
  -                            if (t != null) {
  -                                String tmpUri =  t.getData();
  -                                if (tmpUri != null) {
  -                                    tmpUri = tmpUri.trim();
  -                                    if (tmpUri.equals(uriIn))
  -                                        match = true;
  +                            if (tname.equals("taglib-uri")) {
  +                                Text t = (Text) em.getFirstChild();
  +                                if (t != null) {
  +                                    String tmpUri =  t.getData();
  +                                    if (tmpUri != null) {
  +                                        tmpUri = tmpUri.trim();
  +                                        if (tmpUri.equals(uriIn))
  +                                            match = true;
  +                                    }
                                   }
                               }
  -			}
  -		    }
  -                    if (match == true && tagLoc != null) 
  -                        this.uri = tagLoc;
  -		}
  +                        }
  +                        if (match == true && tagLoc != null) 
  +                            this.uri = tagLoc;
  +                    }
  +                }
               }
  -	    
  +
   	    // "uri" should point to the correct tld location.
   
   	    if (!uri.startsWith("/")) {
  
  
  
  1.6       +2 -3      jakarta-tomcat/src/share/org/apache/jasper/runtime/BodyContentImpl.java
  
  Index: BodyContentImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/BodyContentImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BodyContentImpl.java	1999/11/13 00:16:02	1.5
  +++ BodyContentImpl.java	1999/11/13 00:32:51	1.6
  @@ -1,5 +1,4 @@
   /*
  - * 
    * The Apache Software License, Version 1.1
    *
    * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  @@ -573,8 +572,8 @@
        */
       public void writeOut(Writer out) throws IOException {
           out.write(cb, 0, nextChar);
  -	//Flush not called as the writer passed could be a BodyContent and
  -	//it doesn't allow to flush.
  +	// Flush not called as the writer passed could be a BodyContent and
  +	// it doesn't allow to flush.
       }
   
   
  
  
  
  1.3       +2 -7      jakarta-tomcat/src/share/org/apache/jasper/runtime/HttpJspBase.java
  
  Index: HttpJspBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/HttpJspBase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HttpJspBase.java	1999/11/10 18:21:20	1.2
  +++ HttpJspBase.java	1999/11/13 00:32:52	1.3
  @@ -1,10 +1,4 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/HttpJspBase.java,v 1.2 1999/11/10 18:21:20 costin Exp $
  - * $Revision: 1.2 $
  - * $Date: 1999/11/10 18:21:20 $
  - *
  - * ====================================================================
  - * 
    * The Apache Software License, Version 1.1
    *
    * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  @@ -118,7 +112,8 @@
       }
       
       protected ClassLoader getClassLoader() {
  -	if(cl==null) return this.getClass().getClassLoader();
  +	if (cl == null) 
  +            return this.getClass().getClassLoader();
   	return cl;
       }
   
  
  
  
  1.10      +0 -1      jakarta-tomcat/src/share/org/apache/jasper/runtime/JspServlet.java
  
  Index: JspServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspServlet.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JspServlet.java	1999/11/08 03:14:42	1.9
  +++ JspServlet.java	1999/11/13 00:32:52	1.10
  @@ -1,5 +1,4 @@
   /*
  - * 
    * The Apache Software License, Version 1.1
    *
    * Copyright (c) 1999 The Apache Software Foundation.  All rights