I am using Tomcat 6.0. My folder structure is C:\Tomcat 6.0\webapps\samples. I am using oracle database. I edited the DataBaseConnection java file. This is my file ::::
import java.sql.Connection;
import java.sql.DriverManager;
public class DataBaseConnection {
Connection getConnection(){
Connection conn=null;
try {
Class.forName (“oracle.jdbc.driver.OracleDriver”).newInstance ();
String url = “jdbc:oracle:thin:@192.168.0.81:1521:orcl”;
String username = “dms_db”;
String password = “dms_db”;
conn = DriverManager.getConnection(url, username, password);
} catch (Throwable e) {
e.printStackTrace();
}
return conn;
}
}
When i am trying to run my file using tomcat server i am facing error as load xml. May the connection is not perfect.
And i also do not know their is any other issues…
I just want to run and store event using oracle. I succeed to implement this using php and mysql.
Please anyone give me my answer…
Sample package includes sql dump - have you applied it to the target DB ?
( it necessary for default samples )
Except of db dump importing and DB connection configuration you need not any extra steps.
I am trying this with oracle database and java. In the samples\WEB-INF\src, i edited DataBaseConnection.java by the following way:
import java.sql.Connection;
import java.sql.DriverManager;
public class DataBaseConnection {
Connection getConnection(){
Connection conn=null;
try {
Class.forName (”oracle.jdbc.driver.OracleDriver”).newInstance ();
String url = “jdbc:oracle:thin:@192.168.0.81:1521:orcl”;
String username = “dms_db”;
String password = “dms_db”;
conn = DriverManager.getConnection(url, username, password);
} catch (Throwable e) {
e.printStackTrace();
}
return conn;
}
}
Then i tried to compile all the files inside samples\WEB-INF\src and faced this error:::javax.servlet.http.HttpServlet not found
I tried with php and when i tried php i used dumped data. Now i am trying to using oracle database and java.
Please i need the solutions.