-
March 2nd, 2011, 01:59 PM
#1
sun.jdbc.odbc.JdbcOdbcDriver worked a minute ago
After adding in a few lines of code I got this error:
javax.servlet.ServletException: java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver
I am using MySQL on Ubuntu 10.10.
What am I missing?
Code:
<!-- simple email login page -->
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
</head>
<!-- use sql query to store password -->
<%@ page import="java.sql.*" %>
<body bgcolor="beige">
<table>
<dd><font size="4">EMAIL</font></dd>
<!-- form: when submitted information is sent to Logged-in page -->
<form action="http://192.168.1.100:8081//LoggedinToEmail.jsp" method="get" name="EmailtoJSP">
<tr>
<td>Username:</td>
<!-- user enters data -->
<td><input type="text" name="userName" width="20" size="20" maxlength="50"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password" width="20" size="20" maxlength="50"></td>
</tr>
<!-- user submits -->
<tr>
<td><input type="submit" value="Log In"></td>
</tr>
</table>
<%
String UnameToDatabase=request.getParameter("userName");
String PwordToDatabase=request.getParameter("password");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:DSN"); // connects to database named 'Authenticate'
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
String sqlstatement = "INSERT INTO passwords (username, password) VALUES (UnameToDatabase, PwordToDatabase)";
con.close();
%>
<br>Need To <a href="http://192.168.1.100:8080/RegisterForEmail.jsp">Register?</a><br>
<br><a href="http://192.168.1.100:8081//SendClientPassword.jsp">Trouble</a> Logging In?<br>
</body>
</html>
Last edited by edwardtisdale; March 2nd, 2011 at 02:01 PM.
Reason: Take out peronalization
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|