Thursday, 18 October 2012

JSP

server...

If you do not have a JSP capable web-server or application server, the first step is to download one.  There are many such servers available, most of which can be downloaded for free evaluation and/or development.  Some of them are:

Blazix from Desiderata Software (1.5 Megabytes, JSP, Servlets and EJBs)
TomCat from Apache (Approx 6 Megabytes)
WebLogic from BEA Systems (Approx 40 Megabytes, JSP, Servlets and EJBs)
WebSphere from IBM (Approx 100 Megabytes, JSP, Servlets and EJBs)

 

ALL DBMS PPTS

http://www.cse.iitb.ac.in/~sudarsha/db-book/slide-dir/index.html

JDBC CODE

import java.sql.*;
import javax.sql.*;

public class jdbcdemo{

public static void main(String args[]){
String dbtime;
String dbUrl = "jdbc:mysql://localhost:3306/raju";
String dbClass = "com.mysql.jdbc.Driver";
String query = "Select * FROM users";
String USER = "root";
String PASS = "";

try {

Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection (dbUrl,USER,PASS);
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(query);

while (rs.next()) {
dbtime = rs.getString(1);
System.out.println(dbtime);
} //end while

con.close();
} //end try

catch(ClassNotFoundException e) {
e.printStackTrace();
}

catch(SQLException e) {
e.printStackTrace();
}

}  //end main

}  //end class