Bug 8206

Summary: SQL Actions Aren't Considering url [,driver] [, [user] [, password]
Product: Taglibs Reporter: David Geary <sabreware>
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Windows XP   

Description David Geary 2002-04-17 13:40:10 UTC
If you specify a string value with the syntax in the Summary, 
DataSourceUtil.getDataSource() will throw an exception if it's not a valid 
JNDI path. The call to DataSourceUtil.setUsingParams() is never made.

Here's the pertinent code from DataSourceUtil:

if (rawDataSource instanceof String) {
            try {
                Context ctx = new InitialContext();
                // relative to standard JNDI root for J2EE app
                Context envCtx = (Context) ctx.lookup("java:comp/env");
                dataSource = (DataSource) envCtx.lookup((String)rawDataSource);
            } catch (NamingException ex) {
                throw new JspException(ex.toString(), ex);
            if (dataSource == null) {
Comment 1 Jan Luehe 2002-04-17 21:22:00 UTC