I'm new to JSP, and am trying this sample code for instantiating a bean for use in a disconnected ResultSet, i placed the rowset.jar under WEB-INF/lib directory but i get the following error:
javax.servlet.S ervletException : interface javax.sql.rowse t.CachedRowSet : java.lang.Insta ntiationExcepti on: javax.sql.rowse t.CachedRowSet
and
root cause
java.lang.Insta ntiationExcepti on: interface javax.sql.rowse t.CachedRowSet : java.lang.Insta ntiationExcepti on: javax.sql.rowse t.CachedRowSet
Why won't it instantiate?
Code:
<%@ page import="sun.jdb c.rowset.Cached RowSet" %>
<HTML>
<HEAD>
<jsp:useBean id="Contacts" class="sun.jdbc .rowset.CachedR owSet" scope="session" >
<%
Class.forName(" org.gjt.mm.mysq l.Driver").newI nstance();
// initialize our CachedRowSet bean
Contacts.setUse rname("webuser" );
Contacts.setPas sword("pwd");
Contacts.setUrl ("jdbc:mysql ://localhost:3306/person");
// some drivers require this
Contacts.setTab leName("contact s");
Contacts.setCom mand("SELECT name, telephone from contacts");
Contacts.execut e();
Contacts.first( );
%>
</jsp:useBean>
thanks in advance........ .
Regards,
V. Prasath
javax.servlet.S ervletException : interface javax.sql.rowse t.CachedRowSet : java.lang.Insta ntiationExcepti on: javax.sql.rowse t.CachedRowSet
and
root cause
java.lang.Insta ntiationExcepti on: interface javax.sql.rowse t.CachedRowSet : java.lang.Insta ntiationExcepti on: javax.sql.rowse t.CachedRowSet
Why won't it instantiate?
Code:
<%@ page import="sun.jdb c.rowset.Cached RowSet" %>
<HTML>
<HEAD>
<jsp:useBean id="Contacts" class="sun.jdbc .rowset.CachedR owSet" scope="session" >
<%
Class.forName(" org.gjt.mm.mysq l.Driver").newI nstance();
// initialize our CachedRowSet bean
Contacts.setUse rname("webuser" );
Contacts.setPas sword("pwd");
Contacts.setUrl ("jdbc:mysql ://localhost:3306/person");
// some drivers require this
Contacts.setTab leName("contact s");
Contacts.setCom mand("SELECT name, telephone from contacts");
Contacts.execut e();
Contacts.first( );
%>
</jsp:useBean>
thanks in advance........ .
Regards,
V. Prasath
Comment