[Building Sakai] problem org.sakaiproject.tool.api.ToolException: Exception in JSP:
menjuanpablo
menjuanpablo at gmail.com
Sat May 16 09:13:25 PDT 2009
hi,
I'm connecting my application with data base use JDBC spring, but this
creates a exception in a jsp, in my class the conection is
private DataSource dataSource;
public void setDataSource(DataSource dataSource) {
this.dataSource = dataSource;
}
public String SQL () throws SQLException{
Connection conn = dataSource.getConnection();
String sql="select FIRST_NAME from SAKAI_USER";
try {
Statement st= conn.createStatement();
ResultSet rs= st.executeQuery(sql);
name=rs.getString(1);
return name;
// do things with your connection (select, insert, delete, etc.)
} finally {
conn.close();
}
and in the jsp page I take the name to show, help me, connection is the
problem?
--
View this message in context: http://www.nabble.com/problem-with-jdbc-spring-tp23563454p23575293.html
Sent from the Sakai - Development mailing list archive at Nabble.com.
More information about the sakai-dev
mailing list