Hi,
Here’s my scenario, I am trying the populate the values from oracle to GRID through Java Servlet program. I am able to connect the database and but unable populate in the GRID. Kindly Help me on this. Please find the below codes.
grid_xx_sample_oracle_connector1.java:
package dhtmlx;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import com.dhtmlx.connector.*;
public class grid_xx_sample_oracle_connector1 extends ConnectorServlet {
@Override
protected void configure() {
Connection conn=null;
try {
Class.forName(“oracle.jdbc.driver.OracleDriver”).newInstance();
String connectionURL = “jdbc:oracle:thin:@nsap_ecarqa:1521:ecarqa”;
conn = DriverManager.getConnection(connectionURL,“ecar”,“ecar”);
Statement stmt=conn.createStatement();
Statement st=conn.createStatement();
ResultSet rs0=null;
rs0=stmt.executeQuery(“select * from CA_DATA2”);
while(rs0.next())
{ System.out.println(rs0.getString(“Name”));
System.out.println(rs0.getString(“Quality”));
System.out.println(rs0.getString(“Price”));
}
} catch (Throwable e) {
e.printStackTrace(); }
GridConnector c = new GridConnector(conn, DBType.Oracle);
c.dynamic_loading(100);
((DBDataWrapper)c.sql).sequence(“CA_DATA2.nextVal”);
//c.render_table(“EMPLOYEES”,“EMPLOYEE_ID”,“FIRST_NAME,LAST_NAME”);
c.render_table(“CA_DATA2”, “Name”, “Quality,Price”);
System.out.println(“sucess”);
}}
xx_sample_oracle.html
GRID DEMO .even{ background-color:#E6E6FA; } .uneven{ background-color:#F0F8FF; }web.xml
<?xml version="1.0" encoding="UTF-8"?> oracle_connector dhtmlx.grid_xx_sample_oracle_connector1 oracle_connector /grid/oracle_connectorI am using Tomcat 7 & Eclipse Helios and i am getting error (description)“requested resource is not available” and HTTP Status 404 - /Grid_DB_Conn/oracle_connector.do. Please find the screenshot attached.
Appreciate for help in advance.