posted 17 years ago
Hi,
I am getting JasperException when I want to call by useBean.
code:
<use:Bean id="db" class="com.mob.JdbcConnectionBean" scope="page"/>
<%
Connection con=null;
try{
con=db.connectionCreate();
}
catch(Exception e)
{
out.println(e);
}
%>
In connectionCreate is method:
class JdbcConnectionBean{
Connection con=null;
public Connection connectionCreate() throws Exception,SQLException
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
con=DriverManager.getConnection("jdbc:odbc:MobileX","user","user");
return con;
}
}
I am using Tomcat5.0.1 and JDK 1.5.
How to solve this ?
[ April 07, 2007: Message edited by: amit bhadre ]
Thanks advance who ever answers this question.
regards
amit bhadre