FileDocCategorySizeDatePackage
SetDataSourceTag.javaAPI DocGlassfish v2 API4579Sat May 05 19:17:58 BST 2007org.apache.taglibs.standard.tag.el.sql

SetDataSourceTag

public class SetDataSourceTag extends org.apache.taglibs.standard.tag.common.sql.SetDataSourceTagSupport

Tag handler for <SetDataSource> in JSTL, used to create a simple DataSource for prototyping.

Fields Summary
private String
dataSourceEL
private String
driverClassNameEL
private String
jdbcURLEL
private String
userNameEL
private String
passwordEL
Constructors Summary
Methods Summary
public intdoStartTag()

        evaluateExpressions();

        return super.doStartTag();
    
private voidevaluateExpressions()

        if (dataSourceEL != null) {
                dataSource = ExpressionEvaluatorManager.evaluate
                ("dataSource", dataSourceEL, Object.class, this, pageContext);
        }

        if (driverClassNameEL != null) {
                driverClassName = (String) ExpressionEvaluatorManager.evaluate
                ("driver", driverClassNameEL, String.class, this, pageContext);
        }

        if (jdbcURLEL != null) {
                jdbcURL = (String) ExpressionEvaluatorManager.evaluate
                ("url", jdbcURLEL, String.class, this, pageContext);
        }

        if (userNameEL != null) {
                userName = (String) ExpressionEvaluatorManager.evaluate
                ("user", userNameEL, String.class, this, pageContext);
        }

        if (passwordEL != null) {
                password = (String) ExpressionEvaluatorManager.evaluate
                ("password", passwordEL, String.class, this, pageContext);
        }
    
public voidsetDataSource(java.lang.String dataSourceEL)

	this.dataSourceEL = dataSourceEL;
	this.dataSourceSpecified = true;
    
public voidsetDriver(java.lang.String driverClassNameEL)

	this.driverClassNameEL = driverClassNameEL;
    
public voidsetPassword(java.lang.String passwordEL)

	this.passwordEL = passwordEL;
    
public voidsetUrl(java.lang.String jdbcURLEL)

	this.jdbcURLEL = jdbcURLEL;
    
public voidsetUser(java.lang.String userNameEL)

	this.userNameEL = userNameEL;