hi all,
im new to
jdbc and tried my first app using netbeans 5.5. my db is apache derby. i have correctly set up the driver and populated some tables. but when i write the neccessary code in my
jsp to retrieve information through the DB no data is being displyed. following is my jsp code
<% InitialContext context = new InitialContext();
DataSource dataSource=(DataSource)context.lookup("java:comp/env/jdbc/DataSourceExample");
Connection conn = null;
Statement stmt = null;
ResultSet rset = null;
try{
conn=dataSource.getConnection();
stmt=conn.createStatement();
rset=stmt.excuteQuery("select * from TRAVEL.CARRENTAL");
%>
<%= rset.getString("TRIPID")) %>
//rset.getString("NAME");
//rset.getString("DESCRIPTION");
//rset.getString("LASTUPDATED");
<% }
catch(SQLException e){}%>
<% finally{
if(rset !=null){rset.close();}
if(stmt !=null){stmt.close();}
if(conn !=null){conn.close();}
if(context !=null){context.close();}
}
}%>
can some one please point out to me as to what im doing wrong?
thank you in advance