Hi,
this is the relevant parts of the example for ORACLE connection,
put classes12.zip in the classpath, and use this code.
Config.java
------------
public class Config
{
public static String DbIp = "172.16.1.4";
public static String DbPort = "1521";
public static String DbSid = "v8i815";
public static String DbUsername = "cool";
public static String DbPassword = "cool";
}
parts of db.java
--------
Config conf = new Config();
DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());
con =
DriverManager.getConnection("jdbc:oracle:thin:@"+conf.DbIp+":"+conf.DbPort+"
:"+c
onf.DbSid,conf.DbUsername,conf.DbPassword);
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM
category_mast");
out.println("<HTML><BODY>");
while(rs.next())
{
out.println(rs.getString(1));
}
hope this was helpful
-bala
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets