Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : J2EE : JSP : How to Connect JSP (Tomcat4) with MS access Database Signup · Login
Author Thread
How to Connect JSP (Tomcat4) with MS access Database
Posted in tutorial: Accessing Database using Tags in JSP Pages
·  fobeidat
User
Joined: 20 Apr 2003
Total Posts: 7
How to Connect JSP (Tomcat4) with MS access Database
Posted: 20 Apr 2003
Hi Mr Faisal Khan:

I used your website to follow all your written steps to download Tomcat and applying JSP examples without problem. I really appreciate your efforts.

But my current problem: I have been trying to connect JSP using tomcat server with database in MS Access..I have been going through the required steps...but it seems it is a bit complicated...pls help.

ps: I used to get this message when I run the program:



C:\jakarta-tomcat-4.0-b5\work\localhost\feras\db1_jsp.java:71: Class org.apache.jsp.PreparedStatement not found.
PreparedStatement sql;
^
C:\jakarta-tomcat-4.0-b5\work\localhost\feras\db1_jsp.java:81: Undefined variable or class name: DriverManager
dbconn = DriverManager.getConnection(url);
^
C:\jakarta-tomcat-4.0-b5\work\localhost\feras\db1_jsp.java:111: Class org.apache.jsp.SQLException not found.
catch (SQLException s)



Regarding the other examples I don't have any problems to run my programs. my problem only when i use Database.

This is part of the code:
and I think my poblems is in one of these lines:



<%@ page
import = "java.io.*"
import = "java.lang.*"
import = "java.sql.*"
%>

String url = "jdbc:odbc:ferasdb";
Connection dbconn;

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

dbconn = DriverManager.getConnection(url);






Thanks!




Feras Naser

Users Who Have Visited This Thread In Last 24 Hours
4 Visitors

Login
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2009 Stardeveloper.com, All Rights Reserved.