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) { setUsingParams((String)rawDataSource); } }
Fixed.