ASF Bugzilla – Attachment 1631 Details for
Bug 8283
Providing a javax.sql.DataSource object to the datasource attribute of the setDataSource action fails.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Corrects ClassCastExceptions in SetDataSourceTagSupport
SetDataSourceTagSupport.patch (text/plain), 2.01 KB, created by
Ryan Lubke
on 2002-04-19 12:44:41 UTC
(
hide
)
Description:
Corrects ClassCastExceptions in SetDataSourceTagSupport
Filename:
MIME Type:
Creator:
Ryan Lubke
Created:
2002-04-19 12:44:41 UTC
Size:
2.01 KB
patch
obsolete
>Index: SetDataSourceTagSupport.java >=================================================================== >RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/sql/SetDataSourceTagSupport.java,v >retrieving revision 1.4 >diff -u -r1.4 SetDataSourceTagSupport.java >--- SetDataSourceTagSupport.java 16 Apr 2002 18:15:40 -0000 1.4 >+++ SetDataSourceTagSupport.java 19 Apr 2002 12:42:17 -0000 >@@ -60,6 +60,7 @@ > import javax.servlet.jsp.*; > import javax.servlet.jsp.jstl.sql.*; > import javax.servlet.jsp.tagext.*; >+import javax.sql.DataSource; > import javax.servlet.jsp.jstl.core.Config; > import org.apache.taglibs.standard.tag.common.core.Util; > import org.apache.taglibs.standard.resources.Resources; >@@ -103,28 +104,29 @@ > // Tag logic > > public int doStartTag() throws JspException { >- DataSourceWrapper ds; >+ DataSource ds; > > if (dataSource != null) { > DataSourceUtil dsUtil = new DataSourceUtil(); > dsUtil.setDataSource(dataSource, pageContext); >- ds = (DataSourceWrapper) dsUtil.getDataSource(); >+ ds = (DataSource) dsUtil.getDataSource(); > } > else { >- ds = new DataSourceWrapper(); >+ DataSourceWrapper dsw = new DataSourceWrapper(); > try { > // set driver class iff provided by the tag > if (driverClassName != null) { >- ds.setDriverClassName(driverClassName); >+ dsw.setDriverClassName(driverClassName); > } > } > catch (Exception e) { > throw new JspTagException( > Resources.getMessage("DRIVER_INVALID_CLASS", e.getMessage())); > } >- ds.setJdbcURL(jdbcURL); >- ds.setUserName(userName); >- ds.setPassword(password); >+ dsw.setJdbcURL(jdbcURL); >+ dsw.setUserName(userName); >+ dsw.setPassword(password); >+ ds = (DataSource) dsw; > } > > if (var != null) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 8283
: 1631