09.25.07
JDBC in Eclipse…
1) First we need to download JDBC drivers. I select ojdbc14.jar under Oracle9.2.0.1.
2)Creating a DSN, for this goto Controlpannel->administrative tools->ODBC->userDSN->add ->enter the DSN name: cnya(myname)
TSN name: orcl(what we gave at the time of oracle installation)-> OK.
3)In Eclipse, after creating a new project -> right click on projname-> properties -> select Java Buildpath-> Add External Jars-> enter the downloaded jar file path -> Ok
It adds the external jdbc jars to our project. Read the rest of this entry »
09.24.07
installing oracle9i on windows…
1)download Oracle from here. i will choose Oracle9.2.0.1. we need to unzip the files. it will create 3folders on ur system. disk1, disk2, disk3.
2)to install oracle, open disk1 click on setup file.
3)It opens the Universal Installer Window. click on next
4)by default it wil select the sorce path, for me its in
d:\Oracle_downloads\Disk1\stage\products.jar
for destination(Oracle Home) path,
Name: OraHome92
path: D:\oracle\ora92
these also are given by default, if u want to change the destination path change the drive name (like c:), never change the folder names and structure. Read the rest of this entry »
09.23.07
why Java Database Connectivity(JDBC)…
Java runs on Java Virtual Machine (JVM). JVM translates our application code to byte codes. A database is a separate software system. In order for these two to talk, they need to have a communication channel. Sun offers, through its J2SE, a package entirely dedicated for performing database-related operations. This is the JDBC package.
Just the same way, our printer needs a driver, or our new soundcard needs a driver for the underlying hardware to understand, a database needs a driver. A database can be accessed by proprietary API’s (Application Programming Interfaces). The Java Programmer does not know the intricate API’s of the database. Here is where the concept of driver comes in. The Java programmer makes JDBC calls from his program. The JVM translates the code to the database API. One needs a database driver either from a database vendor, or a J2EE server vendor.
There are four kinds of industry-standard JDBC drivers: Read the rest of this entry »
09.12.07
How to deploy a servlet in eclipse
1)for web applications i wil use eclipse enterprise edition and Apache Tomcat Server
2)and we need a tomcat plugin, unzip it in eclipse plugin folder.
3)open eclipse-> goto window-> customize perspective->commands->select Tomcat & web on left frame-> ok
4)goto window->preferences->clickon Tomcat on leftframe-> select Tomcat version, forme its 5.0-> Browse TomcatHome[i.e., ur Tomcat source folder] ->ok [it wil select jre by default if we already installed jdk]
5)To create a web project-> file->new -> project->select dynamic webproject
6)right click on project -> select buildpath ->configure buildpath->libraries->add external Jars-> browse the “servlet-api.jar”[its in ur tomecatsourefolder->C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib] -> ok
7)To create servlet -> right click on src folder->select other->select servlet
8)to deploy-> build the project-> run as-> run on server[it will automatically starts the server for first time, if u already start the server it wil directly adds to the server]
if it shows any port compatability errors[i got this issue previously], simply stop the server and run the project as above.
9)to browse the servlet in my machine,
http:localhost:8888/FirstServlet/HelloWorld