CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 Help me examining this

Print topic Send  topic

Author Message
tujthevux

Posts: 2
Posted: 07/18/2006, 8:31 PM

This is my Jsp file.
And also, this is the first jsp file in first time I tryed to write jsp
What i received was one line:
"ClassNotFoundException: oracle.jdbc.driver.OracleDriver"

Anyone pls help me... I thank so much. :-X

:-D
  
<%@ page import="java.sql.*" %>  
  
<html>  
    <head>  
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
        <title>JSP Page</title>  
    </head>  
    <body>  
     
<%  
   Connection conn = null;  
   try   
   {  
      Class.forName("oracle.jdbc.driver.OracleDriver");  
  
      conn = DriverManager.getConnection(  
                "jdbc:oracle:thin:@vpbbis:1521:smsdata",  
                "cat",  
                "small");  
  
      Statement stmt = conn.createStatement();  
      ResultSet rs = stmt.executeQuery("SELECT * FROM Example.Emp");  
  
      //Print start of table and column headers  
      out.println("<TABLE CELLSPACING=\"0\" CELLPADDING=\"3\" BORDER=\"1\">");  
      out.println("<TR><TH>ID</TH><TH>NAME</TH></TR>");  
  
      //Loop through results of query.  
      while(rs.next())  
      {  
         out.println("<TR>");  
         out.println("<TD>" + rs.getString("EmpID") + "</TD>");  
         out.println("<TD>" + rs.getString("Name") + "</TD>");  
         out.println("</TR>");  
      }  
  
      out.println("</TABLE>");  
   }  
   catch(SQLException e)  
   {  
      out.println("SQLException: " + e.getMessage() + "<BR>");  
      while((e = e.getNextException()) != null)  
         out.println(e.getMessage() + "<BR>");  
   }  
   catch(ClassNotFoundException e)  
   {  
      out.println("ClassNotFoundException: " + e.getMessage() + "<BR>");  
   }  
   finally  
   {  
      //Clean up resources, close the connection.  
      if(conn != null)  
      {  
         try   
         {  
            conn.close();  
         }  
         catch (Exception ignored) {}  
      }  
   }  
%>  
    </body>  
</html> 
:-D
_________________
Vux
View profile  Send private message
eserver221
Posted: 07/19/2006, 6:28 PM

Add Oracle JAR classes12.zip and odbcXXX.zip to your system's envrionment variable CLASSPATH , then restart jsp container, such as TOMCAT.

Best Regards!
Shawn
Posted: 08/01/2006, 9:51 PM

The Oracle JAR classes12.zip and odbcxxx.zip files come from the codestudio package or somewhere else?


Thank you.
matheus

Posts: 386
Posted: 08/02/2006, 4:49 AM

This wasn't a JSP page, seems like a GSP page...

And where is Codecharge in your code?

If you have a pure Java question please go to another forum.
_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
View profile  Send private message
eserver221
Posted: 08/02/2006, 5:44 PM

Quote Shawn:
The Oracle JAR classes12.zip and odbcxxx.zip files come from the codestudio package or somewhere else?


Thank you.

It's from oracle package. In my installation, they are c:\oracle\ora90\jdbc\lib\class12.zip c:\oracle\ora90\jdbc\lib\ocrs12.zip.
tujthevux

Posts: 2
Posted: 08/03/2006, 7:50 PM

Quote eserver221:
[The Oracle JAR classes12.zip and odbcxxx.zip files come from the codestudio package or somewhere else?


It's from oracle package. In my installation, they are c:\oracle\ora90\jdbc\lib\class12.zip c:\oracle\ora90\jdbc\lib\ocrs12.zip.

Thanks so much. Now it works well. :-{}
_________________
Vux
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.