You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ol...@apache.org on 2020/04/09 23:03:14 UTC

[tomcat-taglibs-standard] 01/02: This commit was manufactured by cvs2svn to create tag 'ea3-07'.

This is an automated email from the ASF dual-hosted git repository.

olamy pushed a commit to tag ea3-07
in repository https://gitbox.apache.org/repos/asf/tomcat-taglibs-standard.git

commit cdd449db78b9b037ae05209052d3e5f0a5ac2a5d
Author: no_author <de...@apache.org>
AuthorDate: Thu Feb 14 00:28:27 2002 +0000

    This commit was manufactured by cvs2svn to create tag 'ea3-07'.
---
 examples/web/import/index.html                     | 102 ------------
 .../taglibs/standard/tag/common/sql/DriverTag.java | 176 ---------------------
 2 files changed, 278 deletions(-)

diff --git a/examples/web/import/index.html b/examples/web/import/index.html
deleted file mode 100644
index e7f604c..0000000
--- a/examples/web/import/index.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<html><!-- #BeginTemplate "/examples/web/Templates/ExamplesTemplate.dwt" -->
-<head>
-<!-- #BeginEditable "doctitle" --> 
-<title>JSTL: Import Tags Examples</title>
-<!-- #EndEditable -->
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="../global.css" type="text/css">
-</head>
-
-<body bgcolor="#FFFFFF" text="#000000">
-<table width="100%" border="0" cellpadding="5">
-  <tr>
-    <td height="0"><font size="-1" color="#000099"><b>JSTL Early Access</b></font></td>
-    <td align="center" height="0"><font size="-1" color="#000099"> <b>Beware &#151; 
-      API and Tags may/will change</b></font></td>
-    <td align="right" height="0"><font size="-1" color="#003399"><a href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a> 
-      &nbsp;&nbsp;<b><a href="mailto:taglibs-dev@jakarta.apache.org">development</a>&nbsp;&nbsp; 
-      <a href="mailto:jsr052-comments@sun.com">comments to JSR052 EG</a></b></font></td>
-  </tr>
-  <tr> 
-    <td colspan="3" bgcolor="#CCCCFF">JSTL Examples &nbsp;&nbsp;&nbsp;&nbsp;<a href="../index.html">Introduction</a> 
-      &#149; <a href="../elsupport/index.html">EL Support </a> &#149; <a href="../conditionals/index.html">Conditionals</a> 
-      &#149; <a href="../iterators/index.html">Iterators</a> 
-      &#149; <a href="index.jsp">Import</a> &#149; <a href="../format/index.html">I18N 
-      & Formatting</a> &#149; <a href="../xml/index.html">XML</a> &#149; <a href="../sql/index.jsp">SQL</a> 
-      &#149; <a href="../ecmascript/index.html">EcmaScript</a> &#149; <a href="../misc/index.html">Misc.</a></td>
-  </tr>
-</table>
-<!-- #BeginEditable "body" --> 
-<h2>Import Tags Examples</h2>
-<p>If you are using a Proxy server, you will need to set the following System 
-  Properties when starting the VM:</p>
-<pre>
-    http.proxyHost
-    http.proxyPort
-    ftp.proxyHost
-    ftp.proxyPort
-</pre>
-<br>
-<h3>Absolute&nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/import/Absolute.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a> 
-  <a href="Absolute.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a> 
-</h3>
-Using an Absolute URL to import a resource. <br>
-<h3>Relative&nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/import/Relative.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a> 
-  <a href="Relative.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a> 
-</h3>
-Using a Relative URL to import a resource. <br>
-<h3>Context Relative&nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/import/ContextRelative.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a> 
-  <a href="ContextRelative.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a> 
-</h3>
-Importing a resource relative to a foreign context. <br>
-<h3>Absolute (FTP)&nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/import/AbsoluteFtp.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a> 
-  <a href="AbsoluteFtp.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a> 
-</h3>
-Using an Absolute URL to import a resource using a different protocol other than 
-HTTP. <br>
-<h3>Encode&nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/import/Encode.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a> 
-  <a href="Encode.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a> 
-</h3>
-URL encoding examples. <br>
-<h3>Encode Context Relative&nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/import/EncodeContextRelative.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a> 
-  <a href="EncodeContextRelative.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a> 
-</h3>
-URL encoding examples using a relative context and nested param tags. <br>
-<h3>Encode Query String&nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/import/EncodeQueryString.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a> 
-  <a href="EncodeQueryString.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a> 
-</h3>
-URL encoding examples using a relative context and query string. <br>
-<h3>String Exposure Absolute&nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/import/ExposeString.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a> 
-  <a href="ExposeString.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a> 
-</h3>
-Exposing the content of the resource as a String Object. <br>
-<h3>String Exposure Relative&nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/import/ExposeStringRelative.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a> 
-  <a href="ExposeStringRelative.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a> 
-</h3>
-Exposing the content of a relative URL's resource as a String Object. <br>
-<h3>Param&nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/import/Param.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a> 
-  <a href="Param.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a> 
-</h3>
-Using <param> element to specify request parameters. Also demonstrating how request 
-parameters can be URL encoded (default). (NOTE: Returns error page that shows 
-how request parameters are encoded) <br>
-<h3>Malformed URL&nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/import/StartSlash.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a> 
-  <a href="StartSlash.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a> 
-</h3>
-A relative URL must start with a "/" in a foreign context. (NOTE: This example 
-will result in a ServletException describing the error condition). <br>
-<!-- #EndEditable -->
-<hr noshade color="#000099">
-<table width="100%" border="0" cellpadding="5">
-  <tr> 
-    <td height="24"><font size="-1" color="#000099"><b>JSTL Early Access</b></font></td>
-    <td align="center" height="24"><font size="-1" color="#000099"> <b>Beware 
-      &#151; API and Tags may/will change</b></font></td>
-    <td align="right" height="24"><font size="-1" color="#003399"><a href="mailto:taglibs-user@jakarta.apache.org"><b>support</b></a> 
-      <b>&nbsp;&nbsp; <a href="mailto:taglibs-dev@jakarta.apache.org">development</a> 
-      &nbsp;&nbsp;<a href="mailto:jsr052-comments@sun.com">comments to JSR052 
-      EG</a></b></font></td>
-  </tr>
-</table>
-</body>
-<!-- #EndTemplate --></html>
diff --git a/src/org/apache/taglibs/standard/tag/common/sql/DriverTag.java b/src/org/apache/taglibs/standard/tag/common/sql/DriverTag.java
deleted file mode 100644
index be0b0b6..0000000
--- a/src/org/apache/taglibs/standard/tag/common/sql/DriverTag.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:  
- *       "This product includes software developed by the 
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
- *    Foundation" must not be used to endorse or promote products derived
- *    from this software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- *    nor may "Apache" appear in their names without prior written
- *    permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */ 
-
-package org.apache.taglibs.standard.tag.common.sql;
-
-import java.util.*;
-import javax.servlet.*;
-import javax.servlet.jsp.*;
-import javax.servlet.jsp.jstl.sql.*;
-import javax.servlet.jsp.tagext.*;
-
-/**
- * <p>Tag handler for &lt;Driver&gt; in JSTL, used to create
- * a simple DataSource for prototyping.</p>
- * 
- * @author Hans Bergsten
- */
-public class DriverTag extends TagSupport {
-    private static final String DRIVER_CLASS_NAME =
-	"javax.servlet.jsp.jstl.sql.driver";
-    private static final String JDBC_URL =
-	"javax.servlet.jsp.jstl.sql.jdbcURL";
-    private static final String USER_NAME =
-	"javax.servlet.jsp.jstl.sql.userName";
-    private static final String PASSWORD =
-	"javax.servlet.jsp.jstl.sql.password";
-
-    private String driverClassName;
-    private String jdbcURL;
-    private int scope = PageContext.PAGE_SCOPE;
-    private String userName;
-    private String var;
-
-    //*********************************************************************
-    // Accessor methods
-
-    public void setDriver(String driverClassName) {
-	this.driverClassName = driverClassName;
-    }
-
-    public void setJdbcURL(String jdbcURL) {
-	this.jdbcURL = jdbcURL;
-    }
-
-    /**
-     * Setter method for the scope of the variable to hold the
-     * result.
-     *
-     */
-    public void setScope(String scopeName) {
-        if ("page".equals(scopeName)) {
-            scope = PageContext.PAGE_SCOPE;
-        }
-        else if ("request".equals(scopeName)) {
-            scope = PageContext.REQUEST_SCOPE;
-        }
-        else if ("session".equals(scopeName)) {
-            scope = PageContext.SESSION_SCOPE;
-        }
-        else if ("application".equals(scopeName)) {
-            scope = PageContext.APPLICATION_SCOPE;
-        }
-    }
-
-    public void setUserName(String userName) {
-	this.userName = userName;
-    }
-
-    public void setVar(String var) {
-	this.var = var;
-    }
-
-    //*********************************************************************
-    // Tag logic
-
-    public int doStartTag() throws JspException {
-	DataSourceWrapper ds = new DataSourceWrapper();
-	try {
-	ds.setDriverClassName(getDriverClassName());
-	}
-	catch (Exception e) {
-	    throw new JspTagException("Invalid driver class name: " +
-		e.getMessage());
-	}
-	ds.setJdbcURL(getJdbcURL());
-	ds.setUserName(getUserName());
-	ds.setPassword(getPassword());
-	pageContext.setAttribute(var, ds, scope);
-	return SKIP_BODY;
-    }
-
-
-    //*********************************************************************
-    // Private utility methods
-
-    private String getDriverClassName() {
-	if (driverClassName != null) {
-	    return driverClassName;
-	}
-	ServletContext application = pageContext.getServletContext();
-	return application.getInitParameter(DRIVER_CLASS_NAME);
-    }
-
-    private String getJdbcURL() {
-	if (jdbcURL != null) {
-	    return jdbcURL;
-	}
-	ServletContext application = pageContext.getServletContext();
-	return application.getInitParameter(JDBC_URL);
-    }
-
-    private String getUserName() {
-	if (userName != null) {
-	    return userName;
-	}
-	ServletContext application = pageContext.getServletContext();
-	return application.getInitParameter(USER_NAME);
-    }
-
-    private String getPassword() {
-	ServletContext application = pageContext.getServletContext();
-	return application.getInitParameter(PASSWORD);
-    }
-}


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