• Post Reply Bookmark Topic Watch Topic
  • New Topic

jasperException

 
amit bhadre
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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("jdbcdbc: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 ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What Jasper exception are you getting?
 
Narasimha Raju Naidu
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
set class path for jasper.jar which is available at common/lib in your tomcat. i think it will work
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Narasimha Raju Naidu:
set class path for jasper.jar which is available at common/lib in your tomcat. i think it will work


Tomcat completely ignores the system classpath.

Besides, since we don't even know what the problem is yet, it's impossible to say what a solution would be.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<use:Bean id="db" class="com.mob.JdbcConnectionBean" scope="page"/>


Try:
<jsp:useBean .../>
 
amit bhadre
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Its typing mistake use:Bean ...it should be <jsp:useBean>


Thank you....
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!